Navicat connection occurs when mysql error code 1251

1251 error code

Is because the password encryption mysql8.0 of different previous 5.0

If the password is letter-style, such as root may happen

1. First enter the command line mysql the root account

 1 Enter password: ****
 2 Welcome to the MySQL monitor.  Commands end with ; or \g.
 3 Your MySQL connection id is 10
 4 Server version: 8.0.17 MySQL Community Server - GPL
 5 
 6 Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
 7 
 8 Oracle is a registered trademark of Oracle Corporation and/or its
 9 affiliates. Other names may be trademarks of their respective
10 owners.
11 
12 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

2. Change the encryption

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.08 sec)

 

3. Change your password

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
Query OK, 0 rows affected (0.02 sec)

 

4. Refresh

1 mysql> FLUSH PRIVILEGES;
2 Query OK, 0 rows affected (0.01 sec)

 

5. Complete

 

 

Guess you like

Origin www.cnblogs.com/flowercatnice/p/11869966.html