Help - Search - Members - Calendar
Full Version: Database Ports?
The Planet Forums > Control Panels > Plesk
EyeSee
I just had a customer ask me what port the database is on. Does anyone know this?
Ales
Well, if it's my mySQL you are interested in, non-local connections to server use port 3306.

You don't need to have this port open if nobody is connecting to the mySQL server remotely... As a security precaution, I would ask them what do they intend to use it for and than set the firewall to let just their specific IP connect to that port.
EyeSee
So am i right in saying that no local scripts would need this information? Only scripts that need to connect to the database from a remote server?

How would i close this port?
Ales
Yes, local scripts do not need this port open to work correctly.

As to closing it - it's the same as with any other port on the server. Are you using an ipchains or iptables firewall?

There is another way, but IMHO more complicated - you could tell mySQL not to listen to outside connections. This is far less secure, so I wouldn't bother with it.
meballard
It's easy to configure MySQL to not listen to outside connections, just create a file called my.cnf in the /etc directory, and put this in it:
[mysqld]
skip-networking

That will prevent the MySQL daemon from even opening the port in the first place.
EyeSee
Ok, thanks peeps.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.