Window 64:
1.修改my-default.ini名称 ==> my.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=mysql-bin
# These are commonly set, remove the # and set as required.
basedir = D:/MySQL/mysql-5.7.12-winx64
datadir = D:/MySQL/mysql-5.7.12-winx64/data
port = 3306
server_id = 10
2.初始化数据文件
mysqld --defaults-file=../my.ini --initialize --console
–initialize 初始化数据文件,设置root账号密码为随机密码,注意查看输出日志
3.安装/删除mysql服务
mysqld install mysql57
sc delete mysql57
4.启动/停止mysql