YSQL-5.7.9.1解压版
例如我的在D:Program FilesMySQLMySQL 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 FilesMySQLMySQL Server 5.7(MySQL Server 5.7是自己的修改过的名称)
# datadir = D:Program FilesMySQLMySQL Server 5.7data (MySQL Server 5.7没有data新建data)
# port = 3306
# server_id = .....
配置变量: 电脑->右键属性->高级系统设置->环境变量->系统变量->Path 双击Path,在最后面添加英文分号“;”然后添加mysql存放目录,如:D:Program FilesMySQLMySQL Server 5.7in
命令提示符(管理员)>进入到MYSQL存放目录,
C:Windowssystem32>d:
D:>cd "Program Files"
D:Program Files>
D:Program Files>cd MySQL
D:Program FilesMySQL>cd My按tab键 然后回车
D:Program FilesMySQLMySQL Server 5.7>
D:Program FilesMySQLMySQL Server 5.7>cd bin然后回车
D:Program FilesMySQLMySQL Server 5.7in>
D:Program FilesMySQLMySQL Server 5.7in>mysqld --initialize-insecure --user=mysql
D:Program FilesMySQLMySQL Server 5.7in>mysqld install
Service successfully installed.
D:Program FilesMySQLMySQL Server 5.7in>net start mysql
MySQL 服务正在启动 . MySQL 服务已经启动成功。