1)C:\Program Files\MySQL\MySQL Server 5.7
在MySQL 的安装目录下添加my.ini文件,同时添加空的data文件
2)my.ini文件内容如下,
[mysqld]
port = 3306
basedir=C:\Program Files\MySQL\MySQL Server 5.7
datadir=C:\Program Files\MySQL\MySQL Server 5.7\data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
max_allowed_packet = 20M
[mysql]
default-character-set=utf8
[client]
port = 3306
default-character-set=utf8
3) 最后执行的命令如下三行:
4)执行成功,结果如下: