mysql >> 本地计算机上的mysql服务启动后停止

0、修改配置文件my.ini
[client]
port=3306
default-character-set=utf8

[mysqld]

port=3306
character_set_server=utf8
basedir=E:\app\mysql-advanced-5.7.11-winx64
datadir=E:\app\mysql-advanced-5.7.11-winx64\data

1、在%MYSQL_HOME%\bin 下执行mysqld –initialize-insecure –user=mysql

2、设置mysql环境变量
%MYSQL_HOME%=E:\app\mysql-advanced-5.7.11-winx64
path=xxx;xxx;%MYSQ_HOME%\bin

3、将mysql注册为服务
mysqld install MySQL –defaults-file=”E:\app\mysql-advanced-5.7.11-winx64\my.ini”

4、启动mysql服务
net start mysql

你可能感兴趣的:(MySQL)