Error 2059 occurs when Navicat connects to MySQL 8.0.13

Navicat connects to MySQL 8.0.11 and a 2059 error occurs.
Error #The
following error occurs when using Navicat Premium to connect to MySQL:
Insert image description here
Reason #
The encryption rule in the version before mysql8 is mysql_native_password, but after mysql8, the encryption rule is caching_sha2_password
Solution #
Change the encryption rule:

mysql -uroot -ppassword #Log in
use mysql; #Select database
database shanged

For remote connection, please replace 'localhost' with '%'

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #Change the encryption method (password is the new password for root)

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #Update user password (password is the new password for root)

FLUSH PRIVILEGES; #Refresh permissions

Insert image description here

Guess you like

Origin blog.csdn.net/weixin_46605889/article/details/121404974