If you’re using MySQL on a web server, you may want to consider switching it to listen on TCP instead of UDP. This will allow you to access your MySQL database from any device that has an TCP connection, including routers and firewalls. There are a few things you need to do in order to switch MySQL to listen on TCP:

  1. Edit your mysql.cnf file and add the following line: mysql_connect_timeout=50000
  2. Edit your mysql.ini file and add the following line: $mysql = “MySQL” ; $mysql -> set_default_socket ( “localhost” , 3306 ); $mysql -> set_default_user ( “root” ); $mysql -> set_default_password ( “password” ); $db = new mysql (); $db -> set_socket ( “$mysql->socket” );

You will want to comment out the bind-address line by making it look like this:

Next, you will need to restart the database server: