0

ERROR 1130 (HY000)

We encountered the error while testing a database connection from one of our app servers to a database server, using the MySQL client

ERROR 1130 (HY000): Host is not allowed to connect to this MySQL server
MySQL MySQL (My- Structured Query Language) Add a comment
matthew
asked Oct 06 2021
edited Oct 06 2021

Answer

0

Thanks for the answer, I was searching for it for so long and at I have found it in your post.

Add a comment
AndrewBrewer
asked Jun 10 2022
Post your Answer
0

On the database server, we have to check the host the user above is allowed to connect from.
Run the following SQL commands to check the user’s host:

 MariaDB [(none)]> SELECT host FROM mysql.user WHERE user = "database_username";

Run the following GRANT command to enable MySQL access for the remote user from a remote host

 MariaDB [(none)]> GRANT ALL ON database_name.* to 'database_username'@'10.24.96.5' IDENTIFIED BY 
 'database_password';%%
 MariaDB [(none)]> FLUSH PRIVILEGES;%%
 MariaDB [(none)]> SELECT host FROM mysql.user WHERE user = "database_username";

To give a user remote access from all host on a network, use the syntax below:

MariaDB [(none)]> GRANT ALL ON database_name.* to 'database_username'@'10.24.96.%' IDENTIFIED BY 
'database_password';

After making the above changes, try to remotely connect to the MySQL database server once more.

mysql -u database_username -p -h 10.24.96.6

We hope this solution helped you in solving your Mysql remote connection erro

Add a comment
linuxhelp
asked Oct 06 2021
Post your Answer