Question

Connection failed: Host 'xxx.xxx.xx.xxxx' is not allowed to connect to this MySQL server

Posted June 7, 2019 16.9k views
MySQLUbuntu 18.04Databases

Hello, can anyone help me with this issue?

Connection failed: Host ‘xxx.xxx.xx.xxxx’ is not allowed to connect to this MySQL server

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi, mysql supports per host permissions which means that your database user must have permission to be able to connect from IP “xxx.xxx.xx.xxxx”.

Here is the relevant mysql documentation:

https://dev.mysql.com/doc/refman/5.7/en/access-control.html

More specific to your issue, this sub-section details how it compares the user and the host the user is connecting from:

https://dev.mysql.com/doc/refman/5.7/en/connection-access.html

This stackoverflow answer has a good overview on making sure you can access your mysql database remotely, including example configs and permission statements:

https://stackoverflow.com/a/32716003

Good luck!