1、配置文件

将以下内容写入 根目录下的 my.ini(my_default.ini) 文件中,没有此文件可以创建一个。

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir = "C:\Program Files\mysql-5.7.17-winx64"
datadir = "C:\Program Files\mysql-5.7.17-winx64\data"
character-set-server = utf8
port = 3306

2、重点看这里

此处注意,无需自行创建 data 文件夹,待初始化会自行创建
进入命令行(管理员身份):(进入 MySQL安装的 bin 目录下)
1、 mysqld --initialize (检查目录下存在 data 文件夹,删除即可)
2、net start mysql

启动成功

Logo

更多推荐