Home > Database > navicat > body text

What should I do if navicat connection error 2059 is reported?

爱喝马黛茶的安东尼
Release: 2019-08-06 10:00:39
Original
4835 people have browsed it

What should I do if navicat connection error 2059 is reported?

Recently, I needed to use a database when learning Django, so I downloaded navicat to be used with mysql, but the following problems did occur when connecting:

What should I do if navicat connection error 2059 is reported?

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

Related recommendations: "Navicat for mysql graphic tutorial"

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

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

1. Open cmd with administrator rights, 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

Under normal circumstances, you can continue to use navicat to connect to mysql successfully. However, I died in the first step and could not enter the database. ;

What should I do if navicat connection error 2059 is reported?

I don’t know if anyone like me has encountered this situation, but don’t panic, cmd is not allowed 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.

What should I do if navicat connection error 2059 is reported?

The above is the detailed content of What should I do if navicat connection error 2059 is reported?. 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