Troubleshooting the Client

  1. Check that the port used by the MySQL server is set to the default of 3306. To use a non-default port, specify the port number with the -P option for the mysql command.
  2. Check the /etc/my.cnf file to verify that the following lines are not present:
    # skip-networking tells mysql server to not listen for tcp/ip connections at all
    skip-networking
    # bind-address should be 0.0.0.0 which tells mysql server to listen on all interfaces, not only localhost (which is what "bind-address = 127.0.0.1" does)
    bind-address = 127.0.0.1
  3. Restart the MySQL server after any changes to the /etc/my.cnf:
    # /etc/init.d/mysqld restart