mysql -u root -p
Enter password:

use mysql;
set global validate_password_policy=0;  ## mysql使用简单密码,不使用可忽略

mysql> UPDATE user SET Password = PASSWORD('新密码') WHERE User = 'root';  ##mysql5.7版本之前
UPDATE user SET authentication_string = PASSWORD('!QCZ2wsx#Mysql') WHERE User = 'root';
UPDATE user SET authentication_string = PASSWORD('!QCZ2wsx#Mysql') WHERE User = 'im_repl';
flush privileges;
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐