Chapter 12 . Security 313 Using (Web hosting faq) socket-based connections
Friday, October 12th, 2007Chapter 12 . Security 313 Using socket-based connections By default, MySQL listens for connections both through sockets for local connections and via TCP/IP for remote connections. If you will not be connecting to MySQL from any hosts other than the MySQL server itself, you should disable the TCP/IP option in MySQL. Disabling networking prevents you from using the -h or hostoption, whether from the local machine or from other hosts on the network. Attempting to connect to a MySQL server that is not available (or not listening for connections) via TCP/IP will result in an error, as shown in Figure 12-5. Figure 12-5: Attempting to connect to a MySQL server that is not listening for connections, using TCP/IP You can disable TCP/IP-based connections by adding the –skip-networking option to the command line when starting the server. Another way to disable TCP/IP access is to add the skip-networkingoption to the [mysqld] section of the MySQL configuration file. In the future, MySQL AB may alter the connection sequence, thus altering the fin gerprint for MySQL. For older servers the fingerprint will remain the same. Changing the MySQL default port While certainly not a substitute for a firewall or for disabling TCP/IP networking, another method for slowing an attack is to change the port that MySQL listens on for connections. By default, MySQL listens on TCP port 3306 for connections. If you change the default port, a curious person who scans for port 3306 won t discover Note
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.