本文摘自PHP中文网,作者angryTom,侵删。

navicat在连接MySQL8.0及以上版本的时候,总是报错1251;原因是MySQL8.0版本的加密方式和MySQL5.0的不一样,连接会报错。下面就为大家介绍一下详细的解决办法。
推荐教程:MySQL数据库入门视频教程
1、先通过命令行进入mysql的root账户:
1 | PS C:\Windows\system32> mysql -uroot -p
|
再输入root的密码:
1 2 3 4 5 6 7 8 9 10 | 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, Oracle 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>
|
2、更改加密方式:
1 2 | mysql> ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.10 sec)
|
3、更改密码:该例子中 123为新密码
阅读剩余部分
相关阅读 >>
怎么破解Navicat
Navicat怎么连接oracle数据库
Navicat是干什么的
用Navicat怎么导出数据字典
Navicat怎么导出sql语句
Navicat怎么用sql语句创建表
Navicat 10061错误怎么解决
Navicat8数据库为什么不能输入汉字
Navicat出现错误1451怎么办
Navicat怎么备份数据库
更多相关阅读请进入《Navicat》频道 >>
机械工业出版社
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。
转载请注明出处:木庄网络博客 » navicat错误1251