1.ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';
原文地址:https://zhidao.baidu.com/question/1704383715138160380.html
2.错误:“Authentication plugin 'caching_sha2_password' cannot be loaded”
登陆mysql数据库后选择mysql database 执行下列语句
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
3. Host ‘xxx.xxx.xxx.xxx’ is not allowed to connect to this MySQL server
解决:mysql> use mysql mysql> select t.host from user t where t.user='root';
mysql>update user set host='%' where user='root';
重启mysql
原文地址:https://blog.csdn.net/zhangchao19890805/article/details/52628925