Problem Description
Navicat for mysql 11.1.13
mysql 8.0.17
Connecting an error message Navicat connection mysql error, error code 1251
Solution
- Before mysql8 are using mysql_native_password to encrypt the password, the default is to use after mysql8 caching_sha2_password.
# cmd 进入mysql数据库
mysql -u root -p
# 修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
# 更新一下密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
Try to connect again after the success tips