This was a lot less straightforward than I expected. So I’m posting the incantations here in hopes it’ll save others some time.
Sequel Pro is a very capable Mac-based, open source, MySQL client. One of these many capabilities is to tunnel via SSH to another server. In this case, we’re going from your host machine (an OSX desktop), to your Vagrant guest machine, to access the MySQL database server there. If you don’t currently have a Vagrant machine on hand, try Puphpet.com.
So, we’re running Sequel Pro in the host machine (OSX).
The first step is to point the host to your localhost IP: 127.0.0.1.
You’ll also need to specify the database’s user and password. Remember, this is the database on the guest machine.
You can optionally add the database name and port number. In this case, I left them blank.
Next we find the vagrant’s IP address.
Next we specify our SSH info.
So, we use the IP address from Step 2, user is vagrant, and the SSH key, .vagrant.d/insecure_private_key, has been created by your vagrant up process, and lives in your home directory.
Now we test, to make sure we have properly set all our parameters.