Garrett Albright
Garrett Albright

Reputation: 2841

MariaDB configured with skip-networking, but port 3306 is open

I have MariaDB set up on my FreeBSD VPS with skip-networking in the my.cnf file, since I'll never need to connect to it directly remotely.

Recently, though, I did a port scan against my own server to see if there were any surprises, and there was one - port 3306 was open. Fortunately, trying to connect to it just returns "Host is not allowed to connect" errors, but I'd rather the port just not be open at all…

If I run the same scan against my local machine, where I also have MariaDB set up with skip-networking, I don't see the port as open…

Is there something that would cause MariaDB to open up a port for itself despite being configured to skip-networking?

Upvotes: 3

Views: 4302

Answers (1)

Garrett Albright
Garrett Albright

Reputation: 2841

As I thought, it turned out the my.cnf file I was looking at (at /opt/local/etc/my.cnf was not actually being read by the daemon as it started… that's surprising, since it seems most other ports-installed programs can read configuration files from that directory just fine. After moving it to /etc/my.cnf, things now work as expected.

Upvotes: 2

Related Questions