MySql Workbench is a great tool for Database Administration and visualization. You can easily view all the Tables, Views, Stored Procedures, etc. available in a Schema and also, view the Data each table is handling and run queries. Workbench can be connected to any DB Server creating a SSH Tunnel. For local development this are the steps to follow if you are using a Vagrant Virtual Machine.

Prerequisites:

 

 Step 1. Turn on your vagrant virtual machine:

~/devzone/cool_vagrant_project$ vagrant up

Step 2. Get from the Vagrantfile the ip you  set for private network:

  # Use private network
  config.vm.network "private_network", ip: "192.168.56.10"

Step 3. Open MySql Workbench and create new Connection.

  • Enter that ip in the SSH Hostname followed by the :22 port
  • Use vagrant as SSH Username
  • Leave SSH Password
  • Provide the absolute path to:
/home/.../.../cool_vagrant_project/.vagrant/machines/default/virtualbox/private_key

 

Step 4. Click on Test Connection Button. If ok, then close the dialog and your new connection is ready to be used

 

From now on, you just need to click on that connection button to open a query editor:

 

Close the session closing the tab.