Quite a few people want to access their Engine Yard hosted MySQL databases remotely which is fine, just complicated by the fact that the database slices are only accessible from the slices themselves. There is no remote access available by default.
Lee Jensen posted a useful forum post Accessing your DB externally, but this advice doesn’t work so well for windows users so here is a brief tutorial.
First, download putty if you haven’t got it already, open it up and configure an SSH connection with the IP address and SSH port of your slice. You can get these from the welcome email you were sent:
Next, go to the Connection -> SSH -> Tunnels config section and configure as following:
In this example I have used mysql50-staging-1 as the MySQL server hostname, replace this with the one you are trying to access. When you have entered the source port and destination click ‘Add’, then ‘Open’. You should see a screen like this:
Enter the slice login details (not the MySQL login details!) and you should see a standard login prompt:
Right, that’s the last of putty for now. Open up your MySQL GUI (I am using MySQL Administrator in this example) and configure it like so:
Make sure you have specified localhost as the mysql hostname, that you are using the MySQL database login credentials and that the port matches the local port you set up in Putty, in this case 13306. Click connect and you should see something like this:
You should be able to change these instructions for any MySQL GUI (the putty config will remain the same).