This article is half-done without your Comment! *** Please share your thoughts via Comment ***
MySQL – ERROR 1130: Host is not allowed to connect to this MySQL server.
I got the above error when one of my client machines were accessing MySQL Server.
By default, MySQL does not allow the remote client to connect the MySQL database server.
If you want to allow your client to access your MySQL database server, you should give access permission to that IP-Address of the client.
If you want to give permission for 10.0.0.12 ip address, please execute below command.
1 2 3 4 5 6 7 8 |
root# mysql -u root -p password: mysql> use mydb; mysql> GRANT ALL ON *.* to root@'10.0.0.12' IDENTIFIED BY 'root_password'; mysql> FLUSH PRIVILEGES; |
If you want to allow user from any network, you should perform the below steps.
Change MySQL config file:
1 |
/etc/mysql/my.cnf |
Comment following lines:
1 2 |
#bind-address = 127.0.0.1 #skip-networking |
If skip-networking line is not present, you can add it and comment it.
Restart MySQL Server:
1 |
root #> mysql restart |
Login in MySQL and change the grant privileges:
1 |
mysql> GRANT ALL ON *.* to root@'%' IDENTIFIED BY 'root_password'; |
Please also make sure that port 3306 is opend which is default port of MySQL Database Server.