首页 > 数据库技术 > 详细

Navicat连接mysql时候出现1251错误代码

时间:2019-11-15 22:53:43      阅读:110      评论:0      收藏:0      [点我收藏+]

出现1251错误代码

是因为mysql8.0的密码加密方式与之前5.0的不同

如果是字母式的密码 比如root 可能会出现这种情况

1.先通过命令行进入mysql的root账户

 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.更改加密方式

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

 

3.更改密码

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

 

4.刷新

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

 

5.完成

技术分享图片

 

 

Navicat连接mysql时候出现1251错误代码

原文:https://www.cnblogs.com/flowercatnice/p/11869966.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!