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
Table of contents 1. The direction of this in the...
introduction With the widespread popularity of In...
Introducing the Geo module of Nginx The geo direc...
I recently started learning the NestJs framework....
Table of contents Use of Vue mixin Data access in...
Table of contents Preface Introduction-Official E...
This is an article about website usability. The a...
You can save this logo locally as a .rar file and...
MySQL is the most popular relational database man...
The main contents of this article are as follows:...
1. Technical points involved vite version vue3 ts...
Table of contents Introduction How to connect to ...
Table of contents Preface Asynchronous loading Pa...
During the use of mysql, it was found that the nu...
Solution to the problem that there is no unzip co...