After installing Navicat MySQL 8.0 connection is not the problem

Navicat MySQL 8.0.1 version connection appears 1251 - Client does not support authentication protocol requested by server solution

Finally installed mysql, mysql client but there have been too low version of the problem. According to the reference of this tutorial, the perfect solution to the problem.

1, enter the command line mysql root directory under the unzipped.

2, landing database

mysql -uroot -p

3, and then enter the root password:

Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018,  and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>

4, changing the encryption method:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

5, change your password: 123 this example, the new password

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';

6. Refresh:

mysql> FLUSH PRIVILEGES;

After this is completed I have successfully solved the problem. If errors are reported, you can see the following step 7, bloggers still gives the solution

7、

// If error ERROR 1396 (HY000): Operation ALTER USER failed for 'root' @ '%':

Remote access is not correct, select the database, and then look at the changes:

mysql> use mysql;
Database changed

mysql> select user,host from user;
+------------------+-----------+
| user             | host      |
+------------------+-----------+
| mysql.infoschema | localhost |
| mysql.session    | localhost |
| mysql.sys        | localhost |
| root             | localhost |
+------------------+-----------+
5 rows in set (0.00 sec)

Guess you like

Origin www.linuxidc.com/Linux/2019-06/158958.htm