Setting up MySQL to listen to external ports

I had some difficulty setting up mysql to listen to external ports on a server – the development web server uses databases on another box. The important setting was in /etc/mysql/my.cnf where I removed the line:

bind-address =

You should then be able to connect a client from another server to this mysql server.

As a warning – bear in mind that it is usually good practice to set up user permissions to only be valid when accessing from localhost if that is the intention – check your mysql table if you can log into the server but then start getting permission problems for other users.

Hope this helps someone!

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

This site uses Akismet to reduce spam. Learn how your comment data is processed.