Getting remote access to MySQL

After setting up my server yesterday I had issue with getting remote access to MySQL it was like it wasn't even running. After some digging around and annoying a linux user (always make sure you know a *nix admin guy, and buy him a scotch or two to say thanks) I found out is was running and it just wasn't bound to the machine's IP address but instead to localhost. For security reasons remote access disabled, but sometimes you need it for one reason or another.
  1. Login via SSH
  2. Edit the my.cnf. On Ubuntu you can do this $ sudo nano /etc/my.cnf
  3. Once file open look for bind-address= and change it for your host machine IP address. So if you host machine is your configuration file would look like:# Instead of skip-networking the default is now to listen only on# localhost which is more compatible and is not less secure.bind-address =
  4. Save, close and restart your mysql service to take change in effect$ /etc/init.d/mysql restart

comments powered by Disqus