• 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

Question Remote access for MariaDB

OverWolf

Regular Pleskian
Hi,
I have some problem to remote access my MariaDB on plesk 17.5.3u47.
I have open on firewall MySql from a specific IP, allow the user to connect from remote, and open DB from remote connection (specific IP), but I have connection error.
The strange things are that, I cannot see any entry on Fail2Ban, even if I have insert a wrong password. So it seems that I cannot connect to DB, but I have some other blocks.

Now, my question is: is ok to only open mysql entry in plesk fw ?

Thank you
 
Do a "telnet <your server> 3306" from the client IP and check if you see the MariaDB connection banner

If no: Make sure your firewall is properly configured and make sure your MariaDB is not just listening on the loopback interface. To verify: "netstat -tulpen", you should see "0.0.0.0:3306" there and not just "127.0.0.1:3306". To change the MariaDB server listening ports, go to Plesk => Tools & Settings => Database Servers => Settings

If yes: Make sure your mysql user is properly configured. A mysql user is identified by username, password _and_ source host. All of the 3 must match for a user to be able to connect.
 
Hi EmmanuelD,

thank you for your support. I have seen that bind-address was only on 127.0.0.1. Now it works on :::3306 (so ipv4 and ipv6). I have read many article about ipv6 and some problem with DB, do you think that I should bind address only on 0.0.0.0 ?
 
If your server is reachable over IPv6 then you can keep your current listening ports configuration. However, you should make sure that you have configured your IPv6 firewall correctly (IPv6 needs its own firewall rules).
 
Back
Top