Host Is Not Allowed to Connect to This MySQL Server

Host Is Not Allowed to Connect to This MySQL Server

This error occurs due to the default configuration the MySQL database is currently using. This configuration allows connections only from the ‘root’ user when coming from ‘localhost’ and not other IP address ranges.

Resolution

Create a new administrator user or modify the root user to allow connections from ‘vScopeServerIP’.

To create a new administrator user, run the following queries in a mysql prompt:

> CREATE USER 'vScopeUserName'@'localhost' IDENTIFIED BY 'password';
> GRANT ALL PRIVILEGES ON *.* TO 'vScopeUserName'@'localhost' WITH GRANT OPTION;
> CREATE USER 'vScopeUserName'@'vScopeServerIP' IDENTIFIED BY 'password';
> GRANT ALL PRIVILEGES ON *.* TO 'vScopeUserName'@'vScopeServerIP' WITH GRANT OPTION;
> FLUSH PRIVILEGES;

To modify the root user (not recommended), run the following queries in a mysql prompt:

> GRANT ALL ON *.* to root@'vScopeServerIP' IDENTIFIED BY 'password';
> FLUSH PRIVILEGES;

Leave a Reply