• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Cannot connect to database remote

Timo002

Basic Pleskian
Hello,

I want to connect to a database remotely. So on the Database User page, I set 'Access control' to "Allow remote connections from any host".

But I can't connect to the database, it keeps rejecting mee. The firewall allows Mysql connections.

I don't know what else to check, other Plesk installations I have running are working fine with remote access.

OS: ‪CentOS Linux 7.1.1503 (Core)‬
Plesk version: 12.5.30 Update #48, last updated at Oct 10, 2016 03:40 PM
 
Three suggestions:

- In /etc/my.cnf: What does the line "bind-address" say? It should read
bind-address = ::
Restart the service after setting this default.

- The firewall may allow MySQL connections, but fail2ban may have blocked your remote host temporarily. Check if its IP address is listed and if so, whitelist it.

- On your remote host, check that the name of the database server (your Plesk host) is spelled correctly and resolves to the IP address of your Plesk host. Your software might not even connect to the correct host.
 
@Peter Debik

/etc/my.cnf didn't had a line "bind-address". So I added. Restarted mariaDB with
$ systemctl restart mariadb
But still can't connect.
I also tried 'bind-address=*' and 'bind-address=xxx.xxx.xxx.xxx' where xxx is the server IP

Concerning fail2ban, I believe it is not installed because the folder `/etc/fail2ban` does not exist.

I'm using the IP address that Plesk shows me under the "system overview" on the "home" page.

I use sequal pro to connect, but I'm getting directly an error:
Code:
Unable to connect to host xxx.xxx.xxx.xxx, 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: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (61)
 
Oke, I got it working and it seemed to be the firewall.

When I checked the firewall in Plesk "Tools & Settings > Firewall", it shows this:
upload_2016-10-11_6-40-20.png

But I manually added a rule for port 3306:
upload_2016-10-11_6-41-37.png

Now it is working fine!
 
I supposed that the default firewall rules where enough, because on other VPS's I'm running with Plesk, I didn't had to change a thing for this. And because of the firewall rule "MySQL server", I supposed this port was open.
 
Back
Top