Source: https://coderwall.com/p/yzwqvg/connect-to-mysql-in-vagrant-with-sequel-pro
First, vagrant ssh and add a user that can connect from anywhere.
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION; FLUSH PRIVILEGES;"
Next, find the address MySQL is bound to.
cat /etc/mysql/my.cnf | grep bind-address
This is the MySQL host you'll be connecting to.
We'll be using the SSH connection tab in Sequel Pro. The username is root. By default, no password is required.
Vagrant's default SSH settings are as follows:
- SSH Host: 127.0.0.1
- SSH User: vagrant
- SSH Key: ~/.vagrant.d/insecureprivatekey
- SSH Port: 2222
Enjoy!