Last active
August 1, 2019 22:25
Revisions
-
beninada renamed this gist
Aug 1, 2019 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ # Connect to MySQL running in Vagrant 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. ``` -
beninada created this gist
Aug 1, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ 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!