Last active
March 30, 2016 17:33
-
-
Save delineas/79b641d673a94e53fc06 to your computer and use it in GitHub Desktop.
SSH Tunnel Mysql Vagrant
This file contains 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 characters
ssh -N -L 3306:127.0.0.1:3316 -p 2222 -i ~/.vagrant.d/insecure_private_key vagrant@127.0.0.1 | |
mysql -u root -proot -P 3316 -h 127.0.0.1 | |
# Alternative | |
ssh -N -L 3317:127.0.0.1:3306 vagrant@VAGRANT_HOST -i /FOLDER/TO/VAGRANT/.vagrant/machines/default/virtualbox/private_key | |
mysql -u root -proot -P 3317 -h 127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment