mysql - Reload vagrant after an update -


what fastest method reload vagrant after changing provisioning script ?

i copying file "mysql.sql" guest machine, in "vagrant":

config.vm.provision "file", source: "mysql.sql", destination: "mysql.sql" 

and call "bootstrap.sh":

mysql -h localhost -u root -proot < /home/vagrant/mysql.sql 

i used use:

vagrant destroy vagrant vagrant provision vagrant ssh 

i tried see if:

vagrant reload 

will same thing, not sure this, since modifications happens on .sql file , not in vagrant file.

you can run vagrant reload --provision run provisioner.

provision

  • on first vagrant up creates environment, provisioning run. if environment created , resuming machine or booting up, won't run unless --provision flag explicitly provided.

  • when vagrant provision used on running environment.

  • when vagrant reload --provision called. --provision flag must present force provisioning.

p.s. bug fix in vagrant 1.7.2, if have error during vagrant reload --provision, car rm .vagrant/machines/default/virtualbox/synced_folders , after run vagrant provision.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -