• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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