• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Issues setting up MySQL Remote Access

Slarpon

New Pleskian
Hi!

I'm having trouble connecting to my databases with a database management application. Currently I'm having to use PHPMyAdmin to manage my databases which is not perfect. Can anyone see what steps I'm missing?

I've followed all the steps from this support article and this one and checked the following;
  • In Database Hosting Settings the setting is set to 'Allow remote connections from any host' and also checked is the option 'Allow local MySQL server to accept external connections'
  • The specific database I'm connecting to is set to 'Allow remote connections from any host'
  • In `/etc/my.cnf` the bind-address is set to 0.0.0.0
  • I've whitelisted my own IP in the Plesk Firewall, it's also not in fail2ban
 
Any error message you received when you try to remotely connect to the database on your server?

I'd would also check whether or not port 3306, the default MySQL port, is open on your firewall (both on your own server as well as on the firewall of your provider, if they have any).
 
Hi, thanks for your reply!

The error message is very generic;

Unable to connect to host example.com, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Unknown MySQL server host 'example.com' (0)
Unknown MySQL server host 'example.com' (0)

(I've changed my actual site to 'example.com')

I was not aware that firewalld was active and I've specifically set port 3306 to open but unfortunatetly that didn't solve the issue;

[root@vin ~]# firewall-cmd --zone=public --permanent --add-port=3306/tcp
success
[root@vin ~]# firewall-cmd --zone=public --permanent --list-ports
3306/tcp
 
Perhaps a firewall (or some other program) is blocking the connection on your own computer or network?

You could check if port 3306 is accessible from an online port checker such as Open Port Check Tool (not sure if this is a safe service, use at your own risk).
 
Back
Top