YSQL-5.7.9.1解压版
例如我的在D:\Program Files\MySQL\MySQL Server 5.7(解压时名字mysql-installer-community-5.7.9.1可以自己修改名称) MySQL Server 5.7中的my-default.ini修改:
# These are commonly set, remove the
# and set as required.
# basedir = D:\Program Files\MySQL\MySQL Server 5.7(MySQL Server 5.7是自己的修改过的名称)
# datadir = D:\Program Files\MySQL\MySQL Server 5.7\data (MySQL Server 5.7没有data新建data)
# port = 3306
# server_id = .....
配置变量: 电脑->右键属性->高级系统设置->环境变量->系统变量->Path 双击Path,在最后面添加英文分号“;”然后添加mysql存放目录,如:D:\Program Files\MySQL\MySQL Server 5.7\bin
命令提示符(管理员)>进入到MYSQL存放目录,
C:\Windows\system32>d:
D:\>cd "Program Files"
D:\Program Files>
D:\Program Files>cd MySQL
D:\Program Files\MySQL>cd My按tab键 然后回车
D:\Program Files\MySQL\MySQL Server 5.7>
D:\Program Files\MySQL\MySQL Server 5.7>cd bin然后回车
D:\Program Files\MySQL\MySQL Server 5.7\bin>
D:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize-insecure --user=mysql
D:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld install
Service successfully installed.
D:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 . MySQL 服务已经启动成功。