(转)Navicat连接MySQL8.0亲测有效
转:https://www.cnblogs.com/shiysin/p/shiysin.html
今天下了个 MySQL8.0,发现Navicat连接不上,总是报错1251;
原因是MySQL8.0版本的加密方式和MySQL5.0的不一样,连接会报错。
试了很多种方法,终于找到一种可以实现的:
更改加密方式
1.先通过命令行进入mysql的root账户:
PS C:\Windows\system32> mysql -uroot -p
再输入root的密码:

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.更改加密方式:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.10 sec)
3.更改密码:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Query OK, 0 rows affected (0.35 sec)
4.刷新:
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.28 sec)
// 如果报错 ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'%' :
则是远程访问权限不正确,先选择数据库,查看一下再更改:

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)
(转)Navicat连接MySQL8.0亲测有效的更多相关文章
- Navicat连接MySQL8.0亲测有效
今天下了个 MySQL8.0,发现Navicat连接不上,总是报错1251: 原因是MySQL8.0版本的加密方式和MySQL5.0的不一样,连接会报错. 试了很多种方法,终于找到一种可以实现的: 更 ...
- Navicat连接Mysql8.0.17出现1251错误 / 或者Navicat Premium出现2059错误
Navicat连接Mysql8.0.17出现1251错误 重装了电脑之后,好多软件出了问题,经过一系列的插件安装,mysql终于安装好了 但是Navicat又抽筋了~~~额(⊙o⊙)... 在网上查的 ...
- navicat连接mysql8.0+版本报错2059
ERROR 2059 : Authentication plugin 'caching_sha2_password' cannot be loaded 问题: 连接Docker启动的mysql出现:E ...
- 使用navicat连接mysql8.0.12版本 出现client does not support。。。解决办法
navicat版本的问题 出现连接失败的原因:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password ...
- 使用navicat连接Mysql8.0出现2059错误
一. 进入MySQL,打开要用navicat连接的数据库 二.打开运行以下代码: ALTER USER 'root'@'localhost' IDENTIFIED BY '你的mysql密码' PAS ...
- 使用Navicat连接MySQL8.0版本报1251错误
出现1251错误是因为,MySQL8.0版本改变了密码的验证规则caching_sha2_password,MySQL之前的版本验证规则是mysql_native_password,现在需要修改MyS ...
- Navicat 连接 Mysql8.0 出现2059问题的解决方法
``` 登陆Mysql后执行命令 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; ...
- Navicat连接MySQL8.0出现1251-Client does not support authentication protocol requested by server;
因为安装的MySQL是8.0版本的,因为在安装的时候采用了新的加密方式. 我们需要使用 cmd命令,连接mysql 1. 更改加密方式 mysql> ALTER USER 'root'@'l ...
- Navicat连接mysql8.0.1版本出现1251--Client does not support authentication protocol requested by server的解决
转载自:https://blog.csdn.net/XDMFC/article/details/80263215 好不容易安装好mysql,但又出现了mysql客户端版本太低的问题.根据参考的这篇博客 ...
随机推荐
- poj1163The Triangle(动态规划,记忆化搜索)
7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calc ...
- Windows系统CVE整理
CVE-2018-8420(RCE) 受影响版本: Microsoft Windows 10 Version 1607 for 32-bit Systems Microsoft Windows 10 ...
- HTML5-新增type属性
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Python 学习笔记17 文本 - 读写
在我们的编程过程中,我们经常需要对文件进行读写操作. 在Python中,对文本的读写非常的方便,只需要简单的几行代码就可以实现. 我们首先新建一个文本文件"Text.txt", 里 ...
- array_map() 函数
定义和用法 array_map() 函数返回用户自定义函数作用后的数组.回调函数接受的参数数目应该和传递给 array_map() 函数的数组数目一致. 语法 array_map(function,a ...
- MyEclipse下Junit报错"The input type of the launch configuration"
MyEclipse下Junit运行测试用例的时候报错: "The input type of the launch configuration does not exist" 原因 ...
- document.domain vs location.hostname vs location.host
限制是同源政策的相同规则 document.domain 获取域名 location.hostname 获取域名 location.host 获取域名+端口 document.domain ...
- 转 router-view 的理解
主要是构建 SPA (单页应用) 时,方便渲染你指定路由对应的组件.你可以 router-view 当做是一个容器,它渲染的组件是你使用 vue-router 指定的.比如: 视图层: <div ...
- redis学习(二)
简单了解一下 1.build.gradle中添加 依赖 org.springframework.boot:spring-boot-starter-data-redis //定义依赖:声明项目中需要哪 ...
- .net 批量导出文件,以ZIP压缩方式导出
1. 首先Nuget ICSharpCode.SharpZipLib <script type="text/javascript"> $(funct ...