windows mysql绿色版配置Mysql5.7.X
MySQL绿色版安装,很简单按照下面的方式很快就可以实现了。
1.下载地址
https://dev.mysql.com/downloads/mysql/
百度网盘链接:https://pan.baidu.com/s/1ieuZsB095CnH61cEBa6Hxg 提取码:1k08
2.配置my.ini 文件
解压下载文件到指定目录。如:
my.ini文件内容:
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... basedir=D:\DEVELOPERS\mysql-5.7.9-winx64 datadir=D:\DEVELOPERS\mysql-5.7.9-winx64\data port=3306 max_connections=500 character-set-server=utf8 default-storage-engine=INNODB server_id=1 # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
3.执行安装mysql
cmd命令令行进入文件目录:
执行mysqld install 命令,出现如下提示,安装成功。
Service sucessfully installed.
注: 如出现 Install/Remove of the Service Denied 请使用管理员启动命令行。
4.初始化数据库
执行 mysqld --initialize 命令没有输出提示。
root 密码初始化在data文件夹 *.err 文件中:
5.启动mysql服务
执行 net start mysql
注:启动mysql服务可以在任意路径下,必须以管理员方式运行的命令行。
6.进入mysql
执行 mysql -u root -p #注:这个命令只能在mysql的bin文件路径下执行。
输入密码,进入系统。
7.修改root密码
执行 set password for root@localhost = password('123456');
8.添加环境变量(可选)
进入数据库查看数据库实例:
纸上得来终觉浅,绝知此事要躬行。
分类:
MySQL
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
2017-10-09 NodeJS在CentOs7下安装