ERROR 1130 (HY000): Host ” is not allowed to connect to this MySQL server

Written by Santosh Prasad

If you are trying to access your database server remotely and getting below error during MySQL login:


“ERROR 1130 (HY000): Host ‘’ is not allowed to connect to this MySQL server”

Then this article will help you to resolve this issue. In this article I will show you how to fix this error.

Mostly this error comes when your root user only have been added with localhost access. You can check using below command, first of all go to your mysql database server and type the below command to check:

mysql> SELECT host FROM mysql.user WHERE User = 'root';
| host      |
| |
| ::1       |
| localhost |
3 rows in set (0.00 sec)

As you can see that root is only allowed from localhost you cannot connect from an external source. If you see other IP addresses.

Next You will need to add the IP address of each system that you want to grant access to, and then grant privileges like below:

CREATE USER 'root'@'ip_address' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ip_address';

You can also allow your root to connect from any remote source use the below command:

CREATE USER 'root'@'%' IDENTIFIED BY 'some_pass';

Finally, reload the permissions, and you should be able to have remote access:


If still you are getting same error check open your my.cnf file and check for below line:

bind-address  =

Now Comment out the bind address from the file /etc/mysql/my.cnf.

#bind-address  =

Next restart mysqld service to apply above changes.

# /etc/init.d/mysqld restart
Thank you! for visiting Look Linux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website To become an author at Look Linux Submit Article. Stay connected to Facebook.

About the author


Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment