解压之后复制my-default.ini到本地目录下的my.ini
修改key:
basedir = D:\softwaremysql-5.7.12-winx64
datadir = D:\softwaremysql-5.7.12-winx64data
port = 3306
之后,切换到mysql的bin目录:
初始化数据文件data,
initialize-insecure:初始化后默认无密码;
--user=root:指定root用户;
--explicit_defaults_for_timestamp::
mysqld --initialize-insecure --user=root --explicit_defaults_for_timestamp --default-file="D:softwaremysql-5.7.12-winx64my.ini"
安装服务
mysqld install
启动服务
net start mysql