Solution to 2059 error when connecting Navicat to MySQL

Solution to 2059 error when connecting Navicat to MySQL

Recently, when I was learning Django, I needed to use a database, so I downloaded Navicat to use it with MySQL, but the following problems occurred during the connection:

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.

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. ; According to most of the suggestions on the Internet, the second method was adopted:

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

mysql -u root -p #Enter the database

2. Modify the encryption rules and password and refresh;

ALTER USER 'root'@'localhost' IDENTIFIED BY 'your mysql password' PASSWORD EXPIRE NEVER; #Modify encryption rules ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your mysql password'; #Modify password FLUSH PRIVILEGES; #Refresh data

-Under normal circumstances, you can continue to use Navicat to connect to MySQL successfully, but I failed at the first step and could not enter the database;

-I don't know if there are any friends who have encountered the same situation as me, but don't panic. If 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.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Solve the problem of Navicat for MySQL reporting 2005 error when connecting to MySQL
  • Common errors and solutions for connecting Navicat to virtual machine MySQL
  • Navicat connects to MySQL8.0.11 and an error 2059 occurs
  • When Navicat connects to MySQL, it reports 10060, 1045 errors and the location of my.ini
  • Solve the 1251 error when establishing a connection between mysql and navicat
  • Solution to 1045 error when navicat connects to mysql
  • Navicat connection MySQL error description analysis

<<:  v-html rendering component problem

>>:  Detailed explanation of virtual DOM in Vue source code analysis

Recommend

How to install Docker and configure Alibaba Cloud Image Accelerator

Docker Installation There is no need to talk abou...

Example code for implementing a pure CSS pop-up menu using transform

Preface When making a top menu, you will be requi...

A brief description of the relationship between k8s and Docker

Recently, the project uses kubernetes (hereinafte...

Analysis of the causes of accidents caused by Unicode signature BOM

Maybe you are using include files here, which is u...

Solution to CSS anchor positioning being blocked by the top fixed navigation bar

Many websites have a navigation bar fixed at the ...

Html to achieve dynamic display of color blocks report effect (example code)

Use HTML color blocks to dynamically display data...

Comparing the performance of int, char, and varchar in MySQL

There are many seemingly true "rumors" ...

HTML+CSS to create heartbeat special effects

Today we are going to create a simple heartbeat e...

HTML code that can make IE freeze

We simply need to open any text editor, copy the f...

WeChat applet development chapter: pitfall record

Recently, I participated in the development of th...

How to use nginx to block a specified interface (URL)

1. Introduction Sometimes, after the web platform...

Detailed explanation of the application of the four states of hyperconnection

Although you think it may be a browser problem, i...

Install CentOS 7 on VMware14 Graphic Tutorial

Introduction to CentOS CentOS is an enterprise-cl...

JavaScript to achieve dynamic table effect

This article shares the specific code for JavaScr...