I had an absolute pain getting Vagrant and MySQL Workbench to play nicely — here’s the fix!
The choice was either get MySQL Workbench working with the VM’s database, or add a provisioning script to install phpMyAdmin. The latter wouldn’t have been that bad, but the former is definitely preferable.
It turned out to be fairly simple and the stumbling block was that sources had said to use the SSH key at
%HOME%\.vagrant.d\insecure_private_key. Here’s the setup:
- Connection Method:
Standard TCP/IP over SSH
- SSH Hostname:
- SSH Username:
- SSH Password:
- Leave SSH Key File blank, despite what you may read elsewhere
- MySQL Hostname:
- MySQL Server Port:
It’s worth clicking Test Connection to check everything’s working. You may be prompted by SSH Server Fingerprint Missing which just means the host is unknown because you’ve never connected to it. Click Continue and you should be greeted by a new windows saying Successfully made the MySQL connection.
If all is well, click OK and be on your merry way. If not, check your VM is up and your settings are correct.