原文https://blog.csdn.net/qq_35654080/article/details/82588188

详解请参考https://blog.csdn.net/chszs/article/details/50651264

发现Navicat连接不上,总是报错1251;

原因是MySQL8.0版本的加密方式和MySQL5.0的不一样,连接会报错。

试了很多种方法,终于找到一种可以实现的:

  更改加密方式

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

ALTER USER 'root'@localhost' PASSWORD EXPIRE INTERVAL 90 DAYS;
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' PASSWORD EXPIRE DEFAULT;
这三句具体作用是什么呢?
第一句有效期验证 90天
第二句 不验证有效期
第三句 设置为默认值

?

1

2

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

Query OK, 0 rows affected (0.10 sec)

3.更改密码:该例子中 123为新密码

?

1

2

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';

Query OK, 0 rows affected (0.35 sec)

4.刷新:

?

1

2

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.28 sec)

Navicat连接mysql报错1251 -client does not support authentication protocol的更多相关文章

  1. Navicat连接Mysql报错:Client does not support authentication protocol requested by server;

    Navicat连接Mysql报错:Client does not support authentication protocol requested by server: 刚安装Mysql,想用Nav ...

  2. MySQL安装教程及Navicat连接MySQL报错:1251-Client does not support authentication protocol requested by server

    MySQL安装可参考: MySql 8.0.18安装 此参考文章后面涉及到的密码修改,对本标题碰到的错误同样适用. 本文先讲如何安装,在讲碰到的1251问题.要直接看解决方案的朋友可以直接通过目录链接 ...

  3. 报错1251 - Client does not support authentication protocol 解决办法

    # 1.容器中登录mysql,查看mysql的版本 status; # 2,进行授权远程连接(注意mysql 8.0跟之前的授权方式不同) GRANT ALL ON *.* TO 'root'@'%' ...

  4. egg 连接 mysql 的 docker 容器,报错:Client does not support authentication protocol requested by server; consider upgrading MySQL client

    egg 连接 mysql 的 docker 容器,报错:Client does not support authentication protocol requested by server; con ...

  5. navicat连接mysql报错1251解决方案

    感谢原文作者:XDMFC 原文链接:https://blog.csdn.net/xdmfc/article/details/80263215 问题描述 今天下了个 MySQL8.0,发现Navicat ...

  6. navicat连接mysql报错1251的解决方法

    1.新安装的mysql8,使用破解版的navicat连接的时候一直报错,如图所示: 2.网上查找原因发现是mysql8 之前的版本中加密规则是mysql_native_password,而在mysql ...

  7. Navicat连接mysql报错1251

    Navicat无法连接MySQL8,是因为MySQL8的方式和MySQL5的加密方式不一样导致 解决方案: 1.通过命令行进入mysql数据库: C:\Windows\system32> mys ...

  8. navicat连接 mysql报错1251解决方案

    转自:https://blog.csdn.net/XDMFC/article/details/80263215 好不容易安装好mysql,但又出现了mysql客户端版本太低的问题.根据参考的这篇博客, ...

  9. navicat连接mysql报错1251解决方案,从头搭建node + mysql 8.0 (本人亲测有效)

    准备学node 好久了 一直没有动手去写,今天突发奇想,然后就安装了一个mysql (找了一个博客跟着步骤去安装的),然后打算用node 写个增删改查. 1.下载mysql安装包   地址: http ...

随机推荐

  1. 【Tools】VMware虚拟机三种网络模式详解和操作

    目录 00. 目录 01. VMware虚拟机三种网络模式 02. Bridged(桥接模式) 03. NAT(地址转换模式) 04. Host-Only(仅主机模式) 00. 目录 @ 参考:htt ...

  2. 『Go基础』第6节 注释

    在上一节中, 我们学会了怎样写一个 Hello Go . 但是, 大家有可能还没有明白为什么那么写, 下面我们通过注释来了解一下. 注释的重要性不再过多赘述, 一段不写注释的代码读起来实在难受. 那么 ...

  3. html2canvas以及domtoimage的使用踩坑总结 动态获取的二维码失效如何生成海报

    //判断手机为安卓还是ios 安卓html2canvas方法 ios系统dom-to-image方法 $(".code").click(function() { var u = n ...

  4. robotFramework_Jquery语法

    向您的页面添加 jQuery 库 jQuery 库位于一个 JavaScript 文件中,其中包含了所有的 jQuery 函数.那么我们怎么判断页面中是否使用了Jquery库呢? 如下图,当页面中引入 ...

  5. Spring AOP 创建Advice 基于Annotation

    public interface IHello { public void sayHello(String str); } public class Hello implements IHello { ...

  6. cefsharp System.IO.FileNotFoundException: 未能加载文件或程序集“CefSharp.Core.dll”或它的某一个依赖项。

    解决办法 安装vc++ 2015 Redistributable 64位系统安装x64 如果还报错先装x64版本再装x86版本 https://files.cnblogs.com/files/xuej ...

  7. day26-python之封装

    1.动态导入模块 # module_t=__import__('m1.t') # print(module_t) # module_t = __import__('m1.t') # print(mod ...

  8. dockerfile命令说明及使用

    执行Dockerfile命令: docker build -f /path/to/a/Dockerfil Dockerfile的基本结构 Dockerfile 一般分为四部分:基础镜像信息.维护者信息 ...

  9. SpringCloud2.0 Config 分布式配置中心 基础教程(十一)

    Spring Cloud Config 简介 Spring Cloud Config为分布式系统中的外部化配置提供服务器和客户端支持.使用Config Server,您可以在所有环境中管理应用程序的外 ...

  10. 学会github管理项目与VS单元测试——第二次作业

    GIT地址 https://github.com/Bing-Fairy/AchaoCalculator GIT用户名 Bing—Fairy 学号后五位 62502 博客地址 https://home. ...