Home > Database > navicat > body text

How to solve error 2059 when navicat connects to mysql

爱喝马黛茶的安东尼
Release: 2019-08-13 16:39:39
Original
20143 people have browsed it

How to solve error 2059 when navicat connects to mysql

navicat reports error 2059 when connecting to mysql, as shown in the figure below:

How to solve error 2059 when navicat connects to mysql

After online query, I found that the reason for this error is The encryption rule in versions before mysql8 is mysql_native_password, while the encryption rule after mysql8 is caching_sha2_password.

There are two ways to solve this problem. One is to update the navicat driver to solve this problem, and the other is to change the encryption rule for mysql user login to mysql_native_password.

Related recommendations: "Navicat for mysql graphic tutorial"

The second method was adopted based on most suggestions on the Internet:

1. Open cmd with administrator privileges, enter mysql -u root -p to enter the password and enter the mysql database;

mysql -u root -p #进入数据库
Copy after login

2. Modify the encryption rules and password and refresh;

ALTER USER 'root'@'localhost' IDENTIFIED BY '你的mysql密码' PASSWORD EXPIRE NEVER; #修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的mysql密码'; #修改密码
FLUSH PRIVILEGES; #刷新数据
Copy after login

Normal situation Continue to use navicat to connect to mysql and it will be successful. However, I died in the first step and could not enter the database;

How to solve error 2059 when navicat connects to mysql

I don’t know if there are friends like me. If you encounter this situation, don't panic. The cmd will not allow you to enter. We can log in directly with mysql client;

Enter the password, enter mysql, and enter the command in the second point to solve the problem.

How to solve error 2059 when navicat connects to mysql

The above is the detailed content of How to solve error 2059 when navicat connects to mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!