Error adding an external database server: Host is not allowed to connect to this MySQL server

Created:

2016-11-16 12:40:21 UTC

Modified:

2017-08-16 16:09:59 UTC

6

Was this article helpful?


Have more questions?

Submit a request

Error adding an external database server: Host is not allowed to connect to this MySQL server

Applicable to:

  • Plesk for Windows
  • Plesk 12.0 for Linux

Symptoms

  • While adding external database server, the following error is received:
    Host 'server IP address' is not allowed to connect to this MySQL server
  • Or another error can be got:

    Error: Access denied for user 'admin'@'mysql server IP' to database

Cause

Connection to MySQL is allowed from localhost by default. If Plesk should be connected to a remote MySQL server, grant MySQL admin user privileges to manage a database from specific IP address (from Plesk IP address).

Resolution

  1. Log in to MySQL database on the external database server.

  2. Run the following queries:

    mysql> GRANT all ON *.* TO admin@'plesk_server_IP';     
    mysql> FLUSH PRIVILEGES;

    Note: replace the username and password with the actual admin credentials and plesk_server_IP with actual Plesk IP address. Also, update firewall rules to make sure port 3306 is opened on the server that is running MySQL Server.

  3. Once you have completed the steps above, please try to add an external database server.
Have more questions? Submit a request
Please sign in to leave a comment.