Enabling Direct Remote Access to MySQL
by Austin Mills
While allowing direct connections to MySQL from outside your slice is not recommended for production instances, during development it can be very convenient to enable connections to MySQL so you can use tools like the MySQL Query Browser. We previously discussed accessing MySQL via SSH tunneling, but if you need to enable direct remote connections, it takes just a few steps:
1. Allow MySQL to listen on the external IP
sudo vi /etc/mysql/my.cnf
Find the bind-address line, and comment it out, allowing MySQL to listen on all addresses.
2. Restart MySQL
sudo /etc/init.d/mysql restart
3. Grant users permissions to connect remotely
From the mysql prompt on the slice:
grant all on *.* to dbuser@’%’ identified by ‘dbpass’;
You should now be able to connect to MySQL remotely with any user you enabled in step 3.
