1、使用默认密码登陆
2、修改默认密码(必须修改默认密码)
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Mysql@23';
3、修改默认密码策略
SHOW VARIABLES LIKE 'validate_password%'; set global validate_password.policy=0; set global validate_password.length=1; SHOW VARIABLES LIKE 'validate_password%';
4、修改为简单密码,并允许任意主机远程登陆
use mysql; select user,host from user; update user set host = 'localhost' where user ='root'; update user set host = '%' where user ='root'; FLUSH PRIVILEGES; select user,host from user; ALTER USER 'root'@'%' IDENTIFIED BY '123456'; FLUSH PRIVILEGES;
标签:set,修改,默认,密码,host,user,mysql From: https://www.cnblogs.com/xue0123/p/17440715.html