前提:

安装MYSQL实例

docker pull mysql

启动mysql(做了端口映射)

[root@localhost ~]# docker run -p 3306:3306 --name mysql02 -e MYSQL_ROOT_PASSWORD=123456 -d mysql

5cf11b6647da2f4d301020934cb8ef750d7215d3c25fb81a56d30fbfd1a24530

言归正传:解决方案如下:

在docker创建mysql容器后使用Navicat远程连接事报错:

操作起来:

先查看user表中的信息:

select host,user,plugin,authentication_string from mysql.user;

host 列中的 % 表示不限制IP ; localhost表示的是本机使用   plugin非mysql_native_password 则需要修改密码

alter user 'root'@'% 'IDENTIFIED WITH mysql_native_password BY '123';

// (注意SQL语句最后加上 ;)

//其中 root用户 密码为123 (按照你的用户 密码对应设置既可)

//最后刷新生效

flush privileges;

[root@localhost ~]# docker run -it --link mysql02:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$M

YSQL_ENV_NYSQL_ROOT_PASSWORD"'

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 8

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> select host,user,plugin,authentication_string from mysql.user;

+-----------+------------------+-----------------------+------------------------------------------------------------------------+

| host | user | plugin | authentication_string |

+-----------+------------------+-----------------------+------------------------------------------------------------------------+

| % | root | caching_sha2_password | $A$005$*@A

| localhost | mysql.infoschema | mysql_native_password | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |

| localhost | mysql.session | mysql_native_password | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |

| localhost | mysql.sys | mysql_native_password | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |

| localhost | root | caching_sha2_password | $A$005$vU(<0Km/fNjY\IW8Ma8ktz5xLyByDbtiEVsGqaIa5B/JzXfuXe9ez0d15VC |

+-----------+------------------+-----------------------+------------------------------------------------------------------------+

5 rows in set (0.03 sec)

mysql> Alter user 'root'@'% 'IDENTIFIED WITH mysql_native_password BY '123';

Query OK, 0 rows affected (0.06 sec)

mysql> flush privileges;

nginx mysql设置远程连接超时_docker -mysql服务设置远程连接 解决1251 client does not support ..问题...相关推荐

  1. mysql服务设置远程连接 解决1251 client does not support ..问题

    mysql服务设置远程连接 解决1251 client does not support ..问题 参考文章: (1)mysql服务设置远程连接 解决1251 client does not supp ...

  2. Mysql 解决1251 client does not support ...问题

    原文地址:MysqMysql 解决1251 client does not support ...问题_dapeng1248的博客-CSDN博客_client does not supportMysq ...

  3. 安装Mysql教程及遇到的问题,如解决1251 client does not support ...问题

    810793@TOC 安装Mysql教程 第一步:下载Mysql MySQL 下载地址为: MySQL 下载链接 . 挑选你需要的 MySQL Community Server 版本及对应的平台下载即 ...

  4. Mysql 问题------解决1251 client does not support ...问题

    一.本地客户端连接服务器上的mysql,问题:1251 client does not support ... 二.解决 1.查看用户信息 select host,user,plugin,authen ...

  5. mysql设置了远程连接查不到视图_mysql服务设置远程连接 解决1251 client does not support ..问题...

    一.前期准备 1.虚拟机/物理机    mysql环境(非本机) 2.本机 navicat软件(验证远程连接) 二 .mysql配置 1.在远程主机的本机   使用root用户连接mysql mysq ...

  6. Navicat 远程连接docker容器中的mysql 报错1251 - Client does not support authentication protocol 解决办法

    Navicat 远程连接docker容器中的mysql 报错1251 - Client does not support authentication protocol 解决办法 1).容器中登录my ...

  7. “1251 – Client does not support authentication protocol requested by server;consider upgrading MySQL

    本文由 比特飞 原创发布,欢迎大家踊跃转载. 转载请注明本文地址:"1251 – Client does not support authentication protocol reques ...

  8. 【MySQL】Navicat 连接数据库出现1251 - Client does not support ... 问题的解决方法及ERROR 1045 (28000): Access deni...

    问题描述 1.Navicat 连接 MySQL时出现问题:1251 - client does not support authentication protocol requested by ser ...

  9. 83998 连接服务器出错_服务端 TCP 连接的 TIME_WAIT 问题分析与解决

    民工哥技术之路 写在开头,大概 4 年前,听到运维同学提到 TIME_WAIT 状态的 TCP 连接过多的问题,但是当时没有去细琢磨:最近又听人说起,是一个新手进行压测过程中,遇到的问题,因此,花点时 ...

最新文章

  1. 深度学习算法_爱奇艺深度学习算法实习生面经
  2. LeetCode 476. Number Complement
  3. 11_less中的条件判断
  4. 队列C++ | 用链表实现队列_2
  5. 单编译framework相关模块
  6. 关于Servlet报错:405 HTTP method GET is not supported by this URL问题解决方法
  7. python 直方图每个bin中的值_python – 如何获取直方图bin中的数据
  8. 陈绪博士作序:这不是一本白皮书 | 凌云时刻
  9. apollo @value没生效_有Apollo,还用Archaius吗?
  10. 计算机专业的创新创业规划书,计算机及相关专业创新创业教育指导书.pdf
  11. mysql mariadb libs_mysql 安装 【解决】mariadb-libs is obsoleted by *** - Ctrl+CCtrl+V - ITeye博客...
  12. project不显示里程碑标志_如何在project中创建里程碑?怎么设置project的里程碑?...
  13. 【VB.net】大地测量——白塞尔大地解算程序设计
  14. 10.curry 方法
  15. HuTool工具最全介绍
  16. 2.leapmotion之开发指南
  17. 光滑曲线_消防水泵-流量扬程性能曲线
  18. 自我激励的100种方法
  19. 非常详细的讲解在浏览器中输入bilibili.com后执行的全部过程,可结合我前面说的TCP协议食用
  20. 人工智能和图像处理方面的各种会议的评级

热门文章

  1. 无人驾驶之车道线检测简易版
  2. 观《超能陆战队》未来的“机器人设计师”的必备装备
  3. Long Read Mapping at Scale: Algorithms and Applications
  4. Dev-Cpp\MinGW64\x86_64-w64-mingw32\include
  5. 序列多重比对工具:MUSCLE
  6. 平方的观测值表概率_中央气象台:“三九”大概率不会比“二九”更冷
  7. 计算机专业数控,数控专业的月薪是多少 数控专业能干什么
  8. html5引入spring标签,[MVC]5 使用Spring标签库
  9. linux监测cpu 内存,Linux中CPU与内存性能监测.docx
  10. linux基础知识_压缩—进程管理-网络管理-ftp-nfs-ssh-scp