How To Allow MySQL Client To Connect Remote MySQL Server
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.
You can check this by doing telnet to 3306 mysql port
To allow a specific client ip-address, Log in to the mysql Server
Now you can see the DB list from the server !
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.2.1 -u root -p
Enter password:
ERROR 1130: Host '192.168.2.1' is not allowed to connect to this MySQL server
Enter password:
ERROR 1130: Host '192.168.2.1' is not allowed to connect to this MySQL server
You can check this by doing telnet to 3306 mysql port
# telnet 192.168.2.1 3306
host 192.168.2.1 is not allowed to connect to this mysql server
host 192.168.2.1 is not allowed to connect to this mysql server
# mysql -u root -p
Enter password:
mysql> use mysql
mysql> grant all privileges on *.* TO 'root'@'ip' identified by 'DB-password';
mysql> FLUSH PRIVILEGES;
Enter password:
mysql> use mysql
mysql> grant all privileges on *.* TO 'root'@'ip' identified by 'DB-password';
mysql> FLUSH PRIVILEGES;
Now you can see the DB list from the server !
# mysql -h 192.168.2.1 -u root -p // Run this from client
How To Allow MySQL Client To Connect Remote MySQL Server
Reviewed by vivek sathisan
on
15:09
Rating:

No comments: