Can’t connect to mysql server on remote server

By | July 2, 2008

By default mysql does not allow connects to itself from any host besides localhost, for security reasons.

When you get an error “Can’t connect to mysql server on [remote server]” when trying to connect to the remote SQL server via the mysql command line tool, log into the server running the mysql server and edit the /etc/mysql/my.cnf config file.

In particular, comment out the following line:
bind-address           =
This allows for connections from any host.

Next, update the mysql user to allow it access from a host other than ‘localhost’.

2 thoughts on “Can’t connect to mysql server on remote server

  1. Pingback: Not allowed to connect to this MySQL server | Mac OS X Leopard & Tiger Dual Boot

Leave a Reply

Your email address will not be published. Required fields are marked *