• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • 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.

Issue Files on Plesk with external DB, can not connect

Ed3000

New Pleskian
Hello, I would really appreciate it someone can tell me what my issue might be so I can research it more. I have been trying this for 7 days with no luck and I know its just a minor misconfiguration, I really appreciate it. Since I have been thru lots of trail and error and can connect the servers, I'll be brief

Original, full wordpress site configured on Digital Ocean droplet running Plesk Obsidian 18, all is fine, runs good

Now, new Digital Ocean Droplet server only for the Database with a different IP address and server, installed LAMP stack, configured Maria DB, added users, permissions, open firewall ,Bind-address to new IP, all works well, so now I have wordpress on Plesk and and empty separate Database server, import Database from the plesk server, all imports fine, tables are the same and data is all there. Changed Plesk server to listen to Database IP with Bind-address

Tested connection with server on Plesk, SSH from server running on Plesk to external database server u- root h- Database_ip -p, works fine, so my Database server is set up and allows server where my wordpress plesk server is to communicate and give access coming from another server.

In plesk, I add another database server with the host being the Database IP address, looks good, lets me in, all the database is there, tables etc, Plesk even opens it with Phpmyadmin and show host as the external IP, so it not being blocked.

So all communications between servers are fine, I go to my wordpress config file, replace the database name, user, password and add the IP address of Database server and that is where the connection can not be established, I have tried over and over, reconfigured, rechecked and I don't understand if servers can communicate, why a connection can not be established.

Its as if the files or something is not going thru to get served, the site has access to the external database to serve it. Unless there is so other configuration which I don't know of.

Here things I have tried while reading for the past 7 days.

Plesk: Fail2ban: added Database IP to whitelist, Firewall: added 2 rules, one with incoming and outgoing with external IP address and port 3306, tried adding IP address to the nginx directory as per this thread How to allow access to a website directory from specific IP address only in Plesk?

I basically need to keep all my files on Wordpress server with Plesk and then have the other server be the database as if all is in one..

Do I need to configure anything else like Apache or internal redirects etc, Im not sure what else try, im completely stuck, would be great to know at least what else to test. Thank You
 
Have you tried on the Database Server:

mysql> CREATE DATABASE wordpress;
mysql> CREATE USER ‘wordpressUser‘@’1.2.3.4‘ IDENTIFIED BY ‘qwertzui123‘;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO ‘wordpressUser‘@’1.2.3.4‘;
mysql> FLUSH PRIVILEGES;

where 1.2.3.4 is the application Server

...and login to the Application Server:
root@application-server:~# mysql -uwordpressUser -p -h4.5.6.7

where 4.5.6.7 is the Database Server
 
@ChrisCP, hello, yes, have tried it from Web Server via SSH to Database server. I have access as well via Plesk as an additional database server and see all the file. After reading more, I think my issue is I never installed Mysql Client thinking it was the same as Mysql Server, seems the Mysql client is what communicates them. I always skipped that step reading articles. Will try it now, and if that was the issue, I will post incase anyone else as the same problem..Thank You for reply
 
Back
Top