mysql5.7安装
下载zip安装包
配置环境变量
D:\Software\mysql-5.7.35\bin
新建my.ini配置文件
[mysqld]
basedir=D:\Software\mysql-5.7.35\
datadir=D:\Software\mysql-5.7.35\data\
port=3306
skip-grant-tables
以管理员身份运行CMD
cd到bin目录
mysqld -install
mysqld --initialize-insecure --user=mysql
启动mysql
net start mysql
进入mysql
mysql -u root -p
修改密码
update mysql.user set authentication_string=password('123456') where user='root' and Host='localhost';
刷新权限
flush privileges;
注释my.ini文件中最后一行
跳过密码登录
skip-grant-tables
重启mysql
net stop mysql
net start mysql
mysql -u root -p123456

浙公网安备 33010602011771号