EyeSee
Mar 20 2002, 01:11 PM
I just had a customer ask me what port the database is on. Does anyone know this?
Ales
Mar 20 2002, 01:54 PM
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
Mar 20 2002, 01:58 PM
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
Mar 20 2002, 02:31 PM
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
Mar 20 2002, 04:01 PM
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
Mar 21 2002, 03:25 AM
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.