MySQL Workbench + Laravel Homestead (Vagrant)
Sometimes i need a visual tool (e.g. MySQL Workbench) for creating, executing, and optimizing SQL queries. So in this post i will demonstrate how you can connect to the installed MySQL databases with MySQL Workbench.
What is your SSH Hostname?
The SSH Hostname is the IP you set in your
Homestead.yaml plus the port number. In this example i will consider
What is your MySQL Hostname?
1- Boot your Vagrant environment:
2- SSH into the machine:
3- And finally run the following command:
Note that in this case your MySQL Hostname will be 10.0.2.15.
Using MySQL Workbench
At this time you already know all you need to create a new MySQL connection. But you can also duplicate the example below: