1.0.0 Summary
Tittle:【MySQL】-NO.21.MySQL.1.MySQL.1.001-【Install MySQL5.7 On Windows】
Style:Web
Series:MySQL
Since:2017-10-23
End:....
Total Hours:...
Degree Of Diffculty:2
Degree Of Mastery:2
Practical Level:2
Desired Goal:2
Archieve Goal:....
Gerneral Evaluation:...
Writer:kingdelee
Related Links:
http://www.cnblogs.com/kingdelee/
1.
download: https://dev.mysql.com/downloads/mysql/
2.
directory:D:\mysql-5.7.20-winx64
新建 my.ini
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:\MySQL\mysql-5.7.16-winx64
# 设置mysql数据库的数据的存放目录
#datadir=D:\MySQL\mysql-5.7.16-winx64\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
explicit_defaults_for_timestamp = true
配置环境变量
进入bin目录执行: mysqld install
mysqld --initialize
net start mysql 若是出现错误,查看错误提示:
mysqld --console 密码在/data/ 的 .err文件中查看
mysqld --default-file="D:\mysql-5.7.20-winx64\my.ini" --skip-grant-tables
重置密码:
mysql -u root
然后输入密码 进入
set password=password("root");
update mysql.user set authentication_string=PASSWORD('root') WHERE User='root';
flush privileges;
exit;