Skip to content

Instantly share code, notes, and snippets.

@bcastellano
Last active June 20, 2016 22:38
Show Gist options
  • Save bcastellano/ef3b8c38b388b9011603cdac34d94674 to your computer and use it in GitHub Desktop.
Save bcastellano/ef3b8c38b388b9011603cdac34d94674 to your computer and use it in GitHub Desktop.
Connect mysql vagrant

1.- edit mysql configuration:

sudo vim /etc/mysql/my.cnf

###change:

...
bind-address            = 0.0.0.0
...

2.- connect mysql:

mysql -u root -p

add host manchine privileges:

use mysql
GRANT ALL ON *.* to root@'<HOST MACHINE IP>' IDENTIFIED BY 'root';
FLUSH PRIVILEGES;
exit

3.- restart service:

service mysql restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment