Navicat连接mysql时候出现1251错误代码
2024-10-08 13:09:55
出现1251错误代码
是因为mysql8.0的密码加密方式与之前5.0的不同
如果是字母式的密码 比如root 可能会出现这种情况
1.先通过命令行进入mysql的root账户
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 8.0. MySQL Community Server - GPL Copyright (c) , , 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.
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.刷新
mysql> FLUSH PRIVILEGES;
Query OK, rows affected (0.01 sec)
5.完成
最新文章
- jsonp模拟获取百度搜索相关词汇
- Install and set JAVA home on MAC OS with commandline
- c++怎么将一个类,拆分出接口类,和实现类
- linux系统执行多条命令,linux系统执行复合命令
- python学习之列表
- GPGPU OpenCL/CUDA 高性能编程的10大注意事项
- asp.net WebForm 多语言的实现
- tomcat+redis实现session共享缓存
- 使用SpringSecurity3用户验证(异常信息,验证码)
- Mac实用操作技巧(一)
- Openstack_O版(otaka)部署_Horizon部署
- palindrome number(回文数)
- mysql学习之check无效的解决及触发器的使用
- phthon--------异常处理
- Openresty 进行路由系统设计
- Flask 构建微电影视频网站(一)
- Python 调用图像融合API
- nodejs -- require , exports , module
- hdu 1392 Surround the Trees 凸包裸题
- C点滴成海------Dev C++怎么修改成简体中文