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” ...
随机推荐
- 10、 在QQ音乐中爬取某首歌曲的歌词
需求就是把关卡内的代码稍作修改,将周杰伦前五页歌曲的歌词都爬取下来,结果就是全部展示打印出来. URL https://y.qq.com/portal/search.html#p ...
- 服务器部署全程记录(centos6.5)
1.安装nginx 上传安装包:put E:\yz_index\installPackage\nginx-1.14.0.tar.gz 解压:tar zxvf nginx-1.14.0.tar.gz 切 ...
- 错误记录:vue跟vue编译器版本不一致
错误如下: error in ./src/Utils.vue Module build failed: Error: Vue packages version mismatch: - vue@ - v ...
- glide:4.7.1 与 26.1.0冲突
implementation 'com.android.support:support-v4:26.1.0'implementation 'com.github.bumptech.glide:glid ...
- S02-45 struts2 最新漏洞 学习记录
今天和朋友一起学习S02-45.按照官方解释:Content-Type:multipart/form-data 这个条件成立的时候,能够触发jakarta的上传漏洞.可能导致远程执行任意代码或者上传文 ...
- ads出现村田电容电感无法仿真的问题解决(`BJT1' is an instance of an undefined model `BJTM1')
需要的控件是 murata include,该控件是跟随村田库一起倒入ADS中的
- 20155324 《Java程序设计》实验五 网络编程与安全
20155324 <Java程序设计>实验五 网络编程与安全 实验内容 任务一 编写MyBC.java实现中缀表达式转后缀表达式的功能 编写MyDC.java实现从上面功能中获取的表达式中 ...
- web api HttpResponseMessage的简单使用
using Lemon.Common; using Lemon.WeChat.Model; using Lemon.WeChat.Services; using Newtonsoft.Json; us ...
- python 小数据池,is and "==",decode ,encode
一:小数据池 1.python运行中的缓存: 2.目的:缓存我们字符串,整数,布尔值.在使用的时候不需要创建过多的对象 3.python 缓存数据:缓存:int, str, bool. ...
- windows server 2012 配置多用户ftp服务器配置注意点
1.ftp根目录配置“FTP授权规则”为: 2.配置“FTP用户隔离”为: 3.配置“FTP目录浏览”为: 4.ftp虚拟目录“FTP授权规则”配置为: