• 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 MariaDB Remote Connections

gManNAtl

New Pleskian
I can't connect remotely to MariaDB even with Telnet, although telnet works locally.

I have :

  • Enabled Remote Connections in the GUI
  • Disabled ModSecurity
  • Modified my.conf
    • bind address to "::"
    • bind address to 0.0.0.0
    • commented out bind address as per the MariaDB documentation
Any help is appreciated

New/Fresh Install on
CentOS Linux 7.8.2003 (Core)
Obsidian Version 18.0.26,
 
Did you restart MariaDB after modifying my.conf? (The :: entry is the correct one.)
 
P.S.: Also check your firewall settings. Some servers, like some hosted at OVH, have a firewall before the server where the port 3306 might be blocked. This is outside your server, not on your server. You can access the setting from your customer control panel at the provider if they have such a firewall for your system.
 
Thank you for confirming the :: is correct. I did restart MariaDB on each change, but I'll do it again to make sure. Regarding the firewall, as mentioned I disabled it completely as this is my own server an have full control, but will verify this again as well. I do suspect it's a software/plesk firewall issue though since I can't eve open the port with telnet on a client on the same LAN as the server. So, I'm not even attempting access from "outside" of the hardware firewall.

I'll do this again and post back shortly.

Thanks,
 
OK, I got it fixed. As I mentioned I disabled ModSecurity in the gui, but I felt positive this was a firewall issue. So, I checked firewall-cmd --state and sure enough firewalld was running in addition to ModSecurity. Stopping firewalld resolved the issue. I am not sure if firewalld should be there or not, and I possibly installed CentOS incorrectly?
 
Am happy to see you was able to fix the remote connection problem, about the firewall is your choice, if you want to keep active or not.
My recommendation is to keep firewall enabled and setup the rules correctly (maybe allow mysql remote connection to only specific sources), make sure all other necessary ports are correct configured and then close all other connections.
You can find a list of all common plesk port here
Ports Used by Plesk
 
Thanks for the input.

I guess what I am really curious about and need to research on is does ModSecurity
  • Require the "old school" firewalld process
    • I don't believe it does as I turned ModSecurity back on and it is logging info
  • Replace firewalld
  • Coexist with firewalld
I know basically nothing about ModSecurity and at least from the GUI doesn't seem to work in the way a traditional firewall works with regards to port forwarding, NAT rules etc.

Anyway, I am good for now and just need to do some reading.

BTW, I don't see a way in this forum to mark a thread resolved. If I am missing it someone please clue me in.

Thanks everyone!
 
Back
Top