If people have been idle for too long, they will think they are working hard when they make an effort. 1. Problem
2. Reasons The password authentication method in mysql_native_password In order to provide a more secure password encryption method, starting from caching_sha2_password The reason for error Client does not support authentication protocol requested by server; Translated into Chinese, it means: " The client does not support the authentication protocol requested by the server ." I use In the root@A day for programmers:/#mysql -u root -p Enter password: Welcome to the MySQL monitor. mysql> mysql> # Check the versionmysql> select version(); +-----------+ | version() | +-----------+ | 8.0.21 | +-----------+ 1 row in set (0.00 sec) mysql> mysql> # View the default encryption method mysql> mysql> use mysql; Database changed mysql> mysql> select host, user, plugin from user; +-----------+------------------+-----------------------+ | host | user | plugin | +-----------+------------------+-----------------------+ | % | root | caching_sha2_password | | localhost | mysql.infoschema | caching_sha2_password | | localhost | mysql.session | caching_sha2_password | | localhost | mysql.sys | caching_sha2_password | | localhost | root | caching_sha2_password | +-----------+------------------+-----------------------+ 5 rows in set (0.00 sec) mysql>
3. Solution There are two ways to solve this problem.
3.1. Modify the password authentication method # Update the root user's password to "123456", # Note that you need to replace "123456" with your own password. Do not use weak passwords! ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; # Refresh permissions to make the password update effective FLUSH PRIVILEGES; A simple demonstration: Step 1: Enter root@ed2a490912e5:/#mysql -u root -p Enter password: mysql> Step 2: Check the default password authentication method. mysql> use mysql; mysql> select host, user, plugin from user; +-----------+------------------+-----------------------+ | host | user | plugin | +-----------+------------------+-----------------------+ | % | root | caching_sha2_password | | localhost | mysql.infoschema | caching_sha2_password | | localhost | mysql.session | caching_sha2_password | | localhost | mysql.sys | caching_sha2_password | | localhost | root | caching_sha2_password | +-----------+------------------+-----------------------+ 5 rows in set (0.00 sec) mysql>
Step 3: Change mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; Query OK, 0 rows affected (0.05 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.04 sec) Step 4: Check mysql> select host, user, plugin from user; +-----------+------------------+-----------------------+ | host | user | plugin | +-----------+------------------+-----------------------+ | % | root | caching_sha2_password | | localhost | mysql.infoschema | caching_sha2_password | | localhost | mysql.session | caching_sha2_password | | localhost | mysql.sys | caching_sha2_password | | localhost | root | mysql_native_password | +-----------+------------------+-----------------------+ 5 rows in set (0.00 sec)
Use
3.2. Install the new version According to my test, http://www.navicat.com.cn/download/navicat-premium The installation is very simple. Just run the installation package and follow the prompts to install it step by step. Unfortunately, Fortunately, it can be cracked! ! !
Attached is a rendering: This is the end of this article about the analysis and solution of the error "1251" when connecting to MySQL 8.0 with Navicat Premium. For more related content about the error when connecting to MySQL 8.0 with Navicat Premium, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Javascript design pattern prototype mode details
>>: Detailed explanation of Docker container data volumes
1. I searched for a long time on the Internet but...
When implementing this function, the method I bor...
Use HTML CSS and JavaScript to implement a simple...
Confluence is paid, but it can be cracked for use...
This article records the specific method of insta...
Use Nginx to build Tomcat9 cluster and Redis to r...
Table of contents 1. Steps to use Jquery: (1) Imp...
Table of contents 1. Routing animation 2. Group Q...
Recommended reading: MySQL 8.0.19 supports accoun...
First download the dependencies: cnpm i -S vue-uu...
1. Export the database using the mysqldump comman...
The following is an introduction to using SQL que...
In the course of work, you will encounter many ca...
There are many reasons for slow query speed, the ...
Autotrash is a command line program that automate...