出现这个问题

首先进入

1、docker exec -it mysql02 bash      //mysql02是mysql容器的别名

2、mysql -uroot -p

3、输入密码

4、进入mysql>命令行界面

1,容器中登录mysql,查看mysql的版本

mysql> status;
--------------

mysql  Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL)

2,进行授权远程连接(注意mysql 8.0跟之前的授权方式不同)

授权

GRANT ALL ON *.* TO 'root'@'%';

刷新权限

flush privileges;

此时,还不能远程访问,因为Navicat只支持旧版本的加密,需要更改mysql的加密规则

3,更改加密规则

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

4,更新root用户密码

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

刷新权限

flush privileges;

OK,设置完成,再次使用 Navicat 连接数据库
---------------------
原文:https://blog.csdn.net/sinat_38345188/article/details/80838098

Navicat 远程连接Docker容器中的mysql 报错:1251 - Client does not support authentication protocol 解决办法。的更多相关文章

  1. Navicat连接mysql报错1251 -client does not support authentication protocol

    原文https://blog.csdn.net/qq_35654080/article/details/82588188 详解请参考https://blog.csdn.net/chszs/articl ...

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

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

  3. 客户端远程连接docker容器中的mysql 报1251错误

    1.启动容器: [root@localhost ~]# docker run -d -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 mysql2.进入容器: [r ...

  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. MySQL安装教程及Navicat连接MySQL报错:1251-Client does not support authentication protocol requested by server

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

  6. c++中sort函数调用报错Expression : invalid operator <的内部原理 及解决办法

    转自:https://www.cnblogs.com/huoyao/p/4248925.html 当我们调用sort函数进行排序时,中的比较函数如果写成如下 bool cmp(const int &a ...

  7. django.db.utils.OperationalError: (1251, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')

    1.打开MySQL: cmd里 net start mysql mysql -hlocalhost -uroot -p回车 进入mysql数据库 2. 命令如下: 1.use mysql; 2.alt ...

  8. docker构建mysql容器及Navicat 远程连接

    1. MySQL部署 1.1拉取MySQL镜像 docker pull mysql 查看镜像 docker images 1.2创建MySQL容器 首先建立所需要的 文件夹: docker run - ...

  9. node mysql问题:Client does not support authentication protocol requested by server; consider upgrading MySQL client!

    node后台 mysql处理模块(版本:2.16.0) 执行connect方法时报错: Client does not support authentication protocol requeste ...

随机推荐

  1. [matlab] 20.图与网络 matlab自带函数使用

    matlab自带的biography(产生一个句柄) 可以用于画图 R=[1 1 2 4 1 2 3 3 5 7 3 4 5 6 7 8]; % 起始节点编号 C=[2 3 3 3 4 5 5 6 6 ...

  2. 机器学习算法总结(五)——聚类算法(K-means,密度聚类,层次聚类)

    本文介绍无监督学习算法,无监督学习是在样本的标签未知的情况下,根据样本的内在规律对样本进行分类,常见的无监督学习就是聚类算法. 在监督学习中我们常根据模型的误差来衡量模型的好坏,通过优化损失函数来改善 ...

  3. 转://Window下安装Oracle ASM单实例数据库

    之前做的Oracle ASM实验都是基于Linux或者Unix操作系统的,最近想试试如何在Windows环境下使用Oracle ASM.本文介绍如何在windows下创建裸设备,并创建ASM磁盘组以及 ...

  4. [教程]教你如何制作彩色的3D打印Groot

    http://mc.dfrobot.com.cn/forum.php?mod=viewthread&tid=24916 准备工作: <ignore_js_op>  3D打印高精度G ...

  5. 16 python 初学(生成器)

     列表生成器(列表生成式): 使用此种方式生成的列表会放在内存中占用内存 a = [x*2 for x in range(1, 11)] print(a) # >>> [2, 4, ...

  6. nginx如何安装第三方模块

    以安装pagespeed为实例 在未安装nginx的情况下安装nginx第三方模块 # ./configure --prefix=/usr/local/nginx-1.4.1 \ --with-htt ...

  7. ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exit

    ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exit   ERROR: ORA-01034:ORACLE ...

  8. 能递归检查DataAnnotations的验证函数

    有时在Command和DTO之间层次比较多,写了个验证Command的函数,能实现递归验证. 比如下面这些有层级关系的class定义,能通过一句代码来进行验证: class A { [Required ...

  9. 《程序猿闭门造车》之NBPM工作流引擎 - 项目整体架构

    前言: 又是一年一度的圣诞节,可这关我什么事呢 :( ,好不容易周末了,还是说说NBPM吧,前不久我发布了一篇关于工作流的文章:<程序猿闭门造车>之NBPM工作流引擎 - 开篇,很多爱好工 ...

  10. Leetcode 143. Reorder List(Medium)

    Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do thi ...