错误原因:mysql加密规则的改变;
mysql加密规则:mysql_native_password mysql8之前的版本
caching_sha2_password mysql8
解决方法:
- ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘password‘ PASSWORD EXPIRE NEVER; //修改加密规则
- ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘password‘; //更新一下用户的密码
- FLUSH PRIVILEGES;//刷新权限
操作示例:
原文地址:https://www.cnblogs.com/GG-Bond/p/9217100.html
时间: 2024-11-05 18:49:12