bcastellano
6/20/2016 - 10:36 PM

Connect mysql vagrant

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