下载安装包"mysql-5.6.34-winx64.zip",放到某个文件夹中,解压安装包,重命名文件夹名为"mysql-5.6.34"


修改"my-default.ini"配置文件:


修改内容如下:
[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 = D:\MySQL\mysql-5.6.34 datadir = D:\MySQL\mysql-5.6.34\data # port = ..... # server_id = .....
设置环境变量:
右击计算机–>属性–>高级系统设置–>环境变量–>系统变量,找到path,在末尾追加 ;D:\MySQL\mysql-5.6.34\bin(
注意路径前面有”;”),点击确定完成。
初始化数据库:
以管理员身份运行cmd:
进入C:\Windows\System32,找到cmd.exe,右击以管理员身份运行,进入bin目录:


cmd中输入mysqld --install
D:\MySQL\mysql-5.6.34\bin>mysqld --install
Service successfully installed.
启动mysql:
D:\MySQL\mysql-5.6.34\bin>net start mysql