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

Summary of CSS front-end knowledge points (must read)

1. The concept of css: (Cascading Style Sheet) Ad...

Vue3 (V) Details of integrating HTTP library axios

Table of contents 1. Install axios 2. Use of axio...

Nginx configuration PC site mobile site separation to achieve redirection

Use nginx to configure the separation of PC site ...

How to operate MySql database with gorm

1. Setting case sensitivity of fields in the tabl...

js+Html to realize table editable operation

This article shares the specific code of js+Html ...

vue-router history mode server-side configuration process record

history route History mode refers to the mode of ...

How to query the intersection of time periods in Mysql

Mysql query time period intersection Usage scenar...

Superficial Web Design

<br />I have always believed that Yahoo'...

WeChat applet realizes horizontal and vertical scrolling

This article example shares the specific code for...

Let's learn about JavaScript object-oriented

Table of contents JavaScript prototype chain Obje...

mysql5.7.17.msi installation graphic tutorial

mysql-5.7.17.msi installation, follow the screens...

Detailed explanation of how to access MySQL database remotely through Workbench

Preface Workbench is installed on one computer, a...

25 Vue Tips You Must Know

Table of contents 1. Limit props to type lists 2....