Skip to content

Instantly share code, notes, and snippets.

@omurphy27
Created July 14, 2016 04:29
Show Gist options
  • Save omurphy27/fb0e366a42ab8836f43054b81f367fd4 to your computer and use it in GitHub Desktop.
Save omurphy27/fb0e366a42ab8836f43054b81f367fd4 to your computer and use it in GitHub Desktop.
Connecting to local homebrew Mysql from inside Vagrant server
// the below works from the command line after sshing in (vagrant ssh)
mysql -p -u root -h 10.0.2.2
// DB connect creds
10.0.2.2 // Hostname of MySQL server
root // Username for local MySQL
root // Password for local MySQL user
database_name // Database name
// see here for more: http://stackoverflow.com/questions/24037087/how-do-i-connect-to-my-local-macbook-mysql-form-vagrant-vm-box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment