I've been using Vagrant at work for a few months now - and I got into it specifically for mimicking our production environment. If you don't know about Vagrant, I highly suggest you check it out. I recently purchased an iMac and I'm utilizing Vagrant VMs for all development. That means I have a few select environments and my machine is bogged down with extra services or dependency issues. Recently I decided to check out MySQL Workbench. The setup is pretty simple, the main step is to make sure you're tunneling through SSH versus connecting directly. The first thing to do is select "Standard TCP/IP over SSH" when configuring your connection.
Once you have the connection method chosen, there are just a few more steps:
- Make sure your SSH Hostname has the proper port (since you're using Vagrant.. it isn't 22, it is whatever the forward was configured as.)
- SSH Username should be 'vagrant' unless you changed that.
- Your SSH Key File will be ~/.vagrant.d/insecure_private_key (psst, to get Drush working you need to use this, too.)