How to Allow MySQL Client to Connect to Remote MySql
How to Allow MySQL Client to Connect to Remote MySQ
By default, MySQL does not allow remote clients to connect to the MySQL database.
If you try to connect to a remote MySQL database from your client system, you will get “ERROR 1130: Host is not allowed to connect to this MySQL server” message as shown below.
$ mysql -h 192.168.1.8 -u root -p Enter password: ERROR 1130: Host '192.168.1.4' is not allowed to connect to this MySQL server
You can also validate this by doing telnet to 3306 mysql port as shown below, which will also give the same “host is not allowed to connect to this mysql server” error message as shown below.
$ telnet 192.168.1.8 3306 host 192.168.1.4 is not allowed to connect to this mysql server
If you want to allow a specific client ip-address (for example: 192.168.1.4) to access the mysql database running on a server, you should execute the following command on the server that is running the mysql database.
$ mysql -u root -p Enter password: mysql> use mysql mysql> GRANT ALL ON *.* toroot@'192.168.1.4' IDENTIFIED BY 'your-root-password'; mysql> FLUSH PRIVILEGES;
Also, update firewall rules to make sure port# 3306 is open on the server that is running the mysql database.
After the above changes, when you try to connect to the mysql database from a remote client, you’ll not get the “Host is not allowed to connect to this MySQL server” error message anymore.
If you want to allow all clients to connect you may do following
GRANT ALL ON *.* to root@’%’ ;
How to Allow MySQL Client to Connect to Remote MySql的更多相关文章
- mysql Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
mysql Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ 今天在linux中安装了mys ...
- Mysql -- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法
启动mysql 报错: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/m ...
- mysql,Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) "
# mysql -uroot -pEnter password:ERROR 2002 (HY000): Can't connect to local MySQL server through sock ...
- 解决mysql:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
(一)出现问题的的报错信息 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) ( ...
- mysql Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
错误原因:/var/lib/mysql目录中socket文件不存在.连接mysql服务器有两种方式:tcp连接,通过socket文件连接.通过socket文件,启动mysql服务,mysql服务会自动 ...
- 配置远程连接mysql数据库 Connect to remote mysql database
设有本地机器(local machine), ip地址为localip 远程机器(remote machine), ip地址remoteip 要通过在local machine的终端连接remote ...
- mysql: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
https://www.cnblogs.com/jpfss/p/9734487.html (mysql.sock错误解决方案)
- 连接Mysql提示Can’t connect to local MySQL server through socket的解决方法
mysql,mysqldump,Mysqladmin,php连接mysql服务常会提示下面错误: ERROR 2002 (HY000): Can't connect to local MySQL se ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
有时候,当我们使用"mysql"."mysqladmin"."mysqldump"等命令管理数据库时,服务器抛出类似如下错误: 一.错误现场 ...
随机推荐
- BWT (Burrows–Wheeler_transform)数据转换算法
1.什么是BWT 压缩技术主要的工作方式就是找到重复的模式,进行紧密的编码. BWT(Burrows–Wheeler_transform)将原来的文本转换为一个相似的文本,转换后使得相同的字符位置连续 ...
- python中的浅拷贝与赋值不同
Python中的对象之间赋值时是按引用传递的,如果需要拷贝对象,需要使用标准库中的copy模块. 1. copy.copy 浅拷贝 只拷贝父对象,不会拷贝对象的内部的子对象. 2. copy.deep ...
- miniui设置边框的方法
if (field == "loginname") { if (record._id == 2) { e.cellHtml = ""; e.cellStyle ...
- 读javascript高级程序设计16-几条函数小技巧
内容概要 作用域安全的构造函数 惰性载入函数 函数绑定 函数节流 一.作用域安全的构造函数 我们知道,当使用new操作符调用构造函数时,构造函数内部的this会指向新创建对象的实例. function ...
- javascript 特殊的一些知识
基础知识 1.注释/**/ 块注释,与正则表达式有冲突,不安全. 2.js数字类型只有一个,即为64位的浮动值 3.NaN是一个数值,他不能产生正常结果的运算结果.NaN不等于任何值,包括它自己.is ...
- iOS开发网络篇—HTTP协议
iOS开发网络篇—HTTP协议 说明:apache tomcat服务器必须占用8080端口 一.URL 1.基本介绍 URL的全称是Uniform Resource Locator(统一资源定位符) ...
- php max_input_vars限制数组大小
今天做一个项目需要post2000个数组过去,发现一直只能接到一半,后来发现是max_input_vars显示问题. 修改php.ini里面max_input_vars的大小就可以了
- iOS8定位问题解决方案
原文 http://blog.csdn.net/nextstudio/article/details/40050095 1.修改info 新增Key: NSLocationAlwaysUsageDe ...
- Introducing Windows 10 Editions(Windows10版本介绍)
Windows 10将在今年夏天正式发布,今天微软官方博客分享了一些Windows 10版本的细节.详见Introducing Windows 10 Editions Windows 10 HomeW ...
- libdispatch for Linux
这个Dispatch是苹果的一个高效的处理库,它在ubuntu上的安装如下: Build/Runtime Requirements 如下: libBlocksRuntime libpthread_wo ...