连接远程数据库时出现 SSH: expected key exchange group packet from server / 2003 - Can't connect to MySQL server on 'XXX' (10038) / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

时间:2022-09-24 22:12:22

昨天在自己的远程服务器上玩,把系统重装了。新装了MySQL,在本地用navicat连接的时候出了几个小问题。

问题一:SSH: expected key exchange group packet from server

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

这个问题在网上查了查说是navicat自己的问题,升级版本就好了。没管那么多,在SSH选项卡里把使用ssh通道取消了,使用常规连接。

问题二:2003 - Can't connect to MySQL server on 'XXX' (10038)

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

第一个问题刚解决,但是第二个问题又出来了,这个问题是我忘了设置MySQL允许远程访问

解决方法是将bind-address = 127.0.0.1注释掉

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

在bind-address = 127.0.0.1这句的前面加上#

问题三:1130 - Host 'XXX' is not allowed to connect to this MySQL server

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

前面两个问题本以为这就好了,结果又报了个这,看意思是我的IP没有权限。在网上查了查,找到了一个解决办法:修改MySQL的用户表

1、登录mysql

mysql -u root -p

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

2、查看一下用户表

use mysql
select host,user from user;

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

3、修改host字段

根据查到的结果可以发现只有本机可以访问,我的做法是把host字段改成%

update user set host = '%' where user = 'root';

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

4、刷新MySQL的系统权限相关表

flush privileges;­

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

再次远程连接数据库成功

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

几经转折,才连接上(╯‵□′)╯︵┴─┴

连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server连接远程数据库时出现 SSH: expected key exchange group packet from server  / 2003 - Can't connect to MySQL server on 'XXX' (10038)  / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

连接远程数据库时出现 SSH: expected key exchange group packet from server / 2003 - Can't connect to MySQL server on 'XXX' (10038) / 1130 - Host 'XXX' is not allowed to connect to this MySQL server的更多相关文章

  1. Navicat 用ssh通道连接时总是报错 (报错信息:SSH:expected key exchange group packet form serve

    转:https://blog.csdn.net/qq_27463323/article/details/76830731 之前下了一个Navicat 11.0 版本 用ssh通道连接时总是报错 (报错 ...

  2. 数据库连接出错 expected key exchange group packet form server

    数据库连接出错 expected key exchange group packet form server SSH: expected key exchange group packet form ...

  3. 使用 PuTTY 时遇到错误:“expected key exchange group packet from server”

    情况 使用 PuTTY 通过 SSH 访问 ProxySG 或 Advanced Secure Gateway (ASG) 时,您会看到如下错误:"expected key exchange ...

  4. navicat使用ssh登录mysql报错:expected key exchange group packet from server

    转载自:https://blog.csdn.net/enweitech/article/details/80677374 解决方法: vim /etc/ssh/sshd_config shift+g ...

  5. 远程连接mysql报错【1130 -host 'localhost' is not allowed to connect to this mysql server】

    远程连接mysql时包如下错误: 1130 -host 'localhost' is not allowed to connect to this mysql server 解决办法 本地用root账 ...

  6. mysql报错:1130 -host 'localhost' is not allowed to connect to this mysql server

    错误提示:1130 -host 'localhost' is not allowed to connect to this mysql server 原因:手贱把mysql数据库系统中mysql数据库 ...

  7. 通过mysql 连接远程数据库时,输入密码后,提示10060错误

    能提示输入密码,说明网络能够连接,而且能连到服务器.输入密码后提示错误,说明应该是权限问题 解决方法: ​一.进入mysql数据库命令行 ​二.输入use mysql; ​三.设置root账号密码为1 ...

  8. python settings :RROR 1130: Host 'XXXXXX' is not allowed to connect to this MySQL server

    pymysql.err.InternalError: (1130, u"Host '127.0.0.1' is not allowed to connect to this MySQL se ...

  9. 用Navicat Premium 连接mysql数据库时报错 -- 1130 Host xxxx is not allowed to connect to this MySQL server

    用Navicat Premium 连接mysql数据库时报错 报错原因:此时的MySQL默认不能远程连接. 解决方案:修改MySQL配置 具体步骤: 1.登陆服务器,进入数据库 mysql -uroo ...

随机推荐

  1. 个人作业—Week2:微软必应词典案例分析

    调研.评测 bug报告: 标题:Window 10版必应词典客户端口语练习功能无法使用 环境:Window 10, 微软必应词典(UWP) 版本2.6.1.0,屏幕无重力感应模块 重现步骤: 1)   ...

  2. video

    <div class="index-video-wrapper"> <video autoplay loop poster="img/index-ima ...

  3. 项目发布&colon; error CS0103&colon; 当前上下文中不存在名称&ldquo&semi;&ast;&ast;&ast;&ast;&ast;&rdquo&semi;

    项目发布,发布不出来,而且编译,发布过程中vs也不报错,也不提示错误.   在错误窗口忽闪一个错误提示之后,输出窗口有西边的提示: error CS0103: 当前上下文中不存在名称"Cur ...

  4. javascript中实现sleep的两种方式

    最近在js中要使用到类似于C++中的sleep函数(让cpu休眠).但是js是不可能让cpu休眠,所以可以通过下面的两种方式模拟sleep函数. 方式一:使用setTimeout函数代替.如果在一个循 ...

  5. 每天一个Linux命令(22)--find命令详解

    find 一些常用参数的一些常用实例和一些具体用法和注意事项. 1.使用 name 选项: 文件名选项是 find 命令最常用的选项,要么单独使用该选项,要么和其他选项一起使用. 可以使用某种文件名模 ...

  6. R语言基础语法

    学习一门新的语言,率先学习输出hello world.我们就从这里开始学习. 首先打开RStudio这个IDE,然后在左边输入: > mystr <- "hello world& ...

  7. HTTP协议的简单介绍

    前传:HTTP协议的演变过程 HTTP(HyperText Transfer Protocol)协议是基于TCP的应用层协议,它不关心数据传输的细节,主要是用来规定客户端和服务端的数据传输格式,最初是 ...

  8. Redis进阶实践之十六 Redis大批量增加数据

    一.介绍      有时,Redis实例需要在很短的时间内加载大量先前存在或用户生成的数据,以便尽可能快地创建数百万个键.这就是所谓的批量插入,本文档的目标是提供有关如何以尽可能快的速度向Redis提 ...

  9. angluarjs2入门学习资源

    http://www.runoob.com/angularjs2/angularjs2-tutorial.htmlhttps://segmentfault.com/a/1190000008423981 ...

  10. OAF实现下拉菜单联动

    当需要输入多个下拉菜单选项时,可能某些下拉菜单是有级联关系的.这时候就需要使用级联的下拉菜单来解决.下面的教程将介绍如何使用ppr制作级联下拉菜单 一.新建AM 在test.oracle.apps.c ...