MySql 8.0后更改root密码的方法

#选择数据库
use mysql;

#关闭安全模式
SET SQL_SAFE_UPDATES = 0;

#选择 user表
select *from user;

#修改先需清空密码
update user set authentication_string='' where user='root';

#后面填密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234567';

猜你喜欢

转载自blog.csdn.net/baidu_28726667/article/details/89738453
今日推荐