telnet mysql时出现:is not allowed to connect to this MySQL serverConnection closed by foreign host问题的解决
有时候telnet一个mysql服务器的时候会出现:
Host '192.168.0.1' is not allowed to connect to this MySQL serverConnection closed by foreign host.
如图:
这个原因是因为索要链接的mysql数据库只允许其所在的服务器连接,需要在mysql服务器上设置一下允许的ip权限,如下:
连接命令端:

1.连接mysql
mysql -u root -p
如图:
2.授权
grant all privileges on *.* to 'root'@'192.168.0.1' identified by '123456';
如图:
当然,如果想给所有ip都赋予权限,则这样:
grant all privileges on *.* to 'root'@'%' identified by '123456';
3.使授权立即生效
flush privileges;
如图:
然后再远程telnet或者连接这个mysql数据库就可以成功了。
参考
https://blog.csdn.net/dongdong9223/article/details/77854690
telnet mysql时出现:is not allowed to connect to this MySQL serverConnection closed by foreign host问题的解决的更多相关文章
- mysql时出现:is not allowed to connect to this MySQL serverConnection closed by foreign host问题的解决
这个原因是因为索要链接的mysql数据库只允许其所在的服务器连接,需要在mysql服务器上设置一下允许的ip权限,如下: 1.连接mysql mysql -u root -p 1 如图: 2.授权 g ...
- 连接远程数据库时出现 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,在本地用navicat连接的时候出了几个小问题. 问题一:SSH: expected key exchange group packet f ...
- 远程连接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账 ...
- 解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server
这段时间在研究火车头的入库教程,在“配置登陆信息和数据库(mysql)”连接中,出现“服务器连接错误Host 'XXX' is not allowed to connect to this MySQL ...
- ERROR 1130: Host is not allowed to connect to this MySQL server
解决远程连接mysql错误1130代码的方法 今天在用远程连接Mysql服务器的数据库,不管怎么弄都是连接不到,错误代码是1130,ERROR 1130: Host 192.168.2.159 is ...
- mysql不能链接远程,报(Host '***.***.***.***' is not allowed to connect to this MySQL server)
Host '***.***.***.***' is not allowed to connect to this MySQL server 其中***...是本机公网ip; 解决办法: 首先看报错窗口 ...
- 新部署的linux web服务器error Host ‘*.*.*.*’ is not allowed to connect to this MySQL server
最近上头交给我个任务,把WINDOWS平台下开发的网站,部署在LINUX环境上. 把mysql安装好了,所有表单都导入没问题,然后代码都放在tomcat下的webapps文件夹下了,主页 面可以正常显 ...
- mysql error 1130 hy000:Host 'localhost' is not allowed to connect to this mysql server 解决方案
ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server D:\Wamp\mysql-\b ...
- Mysql数据库连接报错!1130:host XXX is not allowed to connect to this mysql server
我猜想是可能是连接的用户权限问题.结果这样子操作mysql库,可以解决此问题.在本机登入mysql后,更改 “mysql” 数据库里的 “user” 表里的 “host” 项,从”localhost” ...
随机推荐
- weblogic的基本概念
1.Domain,Administration Server, Managed Server 域包含一个或多个 WebLogic Server 实例. Domain 中包含一个特殊的 WebLogic ...
- consul - 基础
=============================consul 是什么============================= consul 是 HashiCorp 公司推出的开源工具, 该 ...
- SqlExpress与 LocalDB的链接字符串转换
1.如果是连接SQL Server Express databases,需要将连接字符串定义为:Data Source=.SQLEXPRESS" to "Data Source=( ...
- php与java通用AES加密解密算法
AES指高级加密标准(Advanced Encryption Standard),是当前最流行的一种密码算法,在web应用开发,特别是对外提供接口时经常会用到,下面是我整理的一套php与java通用的 ...
- Generic XXE Detection
参考连接:https://www.christian-schneider.net/GenericXxeDetection.html In this article I present some tho ...
- jsp快速开始
[greeting.jsp] <%@ page contentType="text/html;charset=UTF-8" language="java" ...
- web api 过滤器
/// <summary> /// 渠道过滤器 /// </summary> [AttributeUsage(AttributeTargets.Class | Attribut ...
- 实时监听 input值的变化
重点:$('#xx').bind('input propertychange', function() {} 举例子: html: <div ><span id="numb ...
- 15款Java程序员必备的开发工具(转)
如果你是一名Web开发人员,那么用膝盖想也知道你的职业生涯大部分将使用Java而度过.这是一款商业级的编程语言,我们没有办法不接触它 对于Java,有两种截然不同的观点: 一种认为Java是最简单功能 ...
- 标准盒模型、IE盒模型
结论:IE盒模型是陈旧知识点,除了帮助理解css3 box-sizing: border-box(等分宽度布局)外没什么用. 标准(W3C)模型中:CSS中的宽(width) = 内容 (conten ...