2059 error when navicat connects to MySQL

I newly installed MySQL today, but Navicat could not connect, so I reported this error directly. After surfing the Internet for a while, I finally found the reason and solution.

Reason: After analyzing and searching for relevant information, I found new features of MySQL 8.0 and adopted a new and safer authentication method, caching_sha2_password

solution:

1. Enter the CMD command window (win+R)

2. Enter the bin path of the mysql installation directory and run the mysql -uroot -p command to log in (the password is the password set when installing mysql) -- (my address is: C:\Program Files\MySQL\MySQL Server 8.0\bin )

3. Enter ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; (root is the user name, localhost is the ip address 127.0.0.1 is the local machine, mysql_native_password is the old password authentication mechanism, root is the password, don't forget the semicolon at the end ;)

4. Enter Navicat to test the connection

At this point, the problem is solved. If you have other questions, welcome to communicate with Xiaobian, Xiaobian QQ 907044657

Additional MySQL installation download address:  https://dev.mysql.com/downloads/mysql/

Related Posts