- Ubuntu 16.04
- MySQL 5.7
- Vagrant 2.0.2
VAGRANT
EDIT Vagrantfile
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 3306, host: 3306
end
MySQL (guest)
EDIT /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
GRANT PRIVILEGES
On the guest machine, login to local mysql server and execute the following sqls.
GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.0.2.2' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
TEST
mysql -uroot -p
Top comments (0)