Home > Database > navicat > body text

navicat reports 2059 error when connecting to MySQL

(*-*)浩
Release: 2019-08-21 17:34:35
Original
6623 people have browsed it

navicat reports 2059 error when connecting to MySQL

Today when using Navicat to connect to mysql, a 2059 error was reported. In order to solve this seemingly easy problem, I also tried many methods. Here I will share my experience with you. experience of. (Recommended tutorial: navicat tutorial)

A 2059 error will occur when using navicat to connect to MySQL8. This is because the new version of MySQL uses the caching_sha2_password authentication method, but at this time Navicat does not yet support this verification method.

The solution is to change the verification method to the verification method mysql_native_password used in previous versions (5.7 and below).

For specific verification methods, you can view the user table plugin field in the default database 'mysql'.

No 2059 error will occur when logging in to the database from the command line. Log in to the database from the command line and execute the following command.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Copy after login

'root' can be changed to your own defined user name, 'localhost' refers to the IP open to the user, which can be 'localhost' (local access only, equivalent to 127.0.0.1), It can be specific '...' (a specific IP) or '%' (all IPs can be accessed). 'password' is the authentication password you want to use.

Friendly reminder: Be sure to remember the changed password, otherwise it will be very troublesome if you forget it.

navicat reports 2059 error when connecting to MySQL##

The above is the detailed content of navicat reports 2059 error when connecting 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!