Vvv: Mysql unrecognised service

Created on 1 Dec 2016  ·  8Comments  ·  Source: Varying-Vagrant-Vagrants/VVV

I am getting following error when trying to do vagrant up :
Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'ubuntu/trusty64' is up to date... ==> default: Machine already provisioned. Runvagrant provisionor use the--provision ==> default: flag to force provisioning. Provisioners marked to run always will still run. ==> default: Running provisioner: shell... default: Running: inline script ==> default: mysql: unrecognized service The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

I have tried provisioning : vagrant up --provision and got the same error.
I have tried destroying the vagrant and VM completely and then reinstalled.
Using the Latest ubuntu image
I can login to the vagrant via SSH and have tried installing the mysql via gem but vagrant up always returns the same error.

Note that the Vagrant instance was working for past 6 months and did crash a few times but not like this. It would just not start. Any clues ?

Most helpful comment

Yes, forgot to update here, I was able to resolve this by following these steps, note that Vagrant halt/destroy commands were not working :

  1. I removed the Vagrant virtual machine from the Virtual box manually from the GUI
  2. Then renamed the vagrantfile for backup
  3. Re-initialised the Vagrant by vagrant init
  4. Copied the backup file contents in the new vagrantfile
  5. Vagrant up

now everything runs fine. Not sure exactly what happened.

All 8 comments

Update : So, I logged in to my VM and installed the mysql service : sudo apt-get install mysql-server
but then it showed the error "nginx: unrecognized service" then I installed the nginx and then again I got the error : bash: vagrant_up: command not found

Nothing works ! All of a sudden everything stops working.

+1

Hi @MrVibe, thanks for opening an issue. Can you destroy the VM with vagrant destroy and then copy the contents of the next vagrant up into a gist (gist.github.com) or something similar so that we can see the entire provisioning process to look for errors?

Yes, forgot to update here, I was able to resolve this by following these steps, note that Vagrant halt/destroy commands were not working :

  1. I removed the Vagrant virtual machine from the Virtual box manually from the GUI
  2. Then renamed the vagrantfile for backup
  3. Re-initialised the Vagrant by vagrant init
  4. Copied the backup file contents in the new vagrantfile
  5. Vagrant up

now everything runs fine. Not sure exactly what happened.

Excellent, happy to hear it's back!

Hi, @MrVibe, I faced the same problem, by using your method, it resolve my problem.
Thank you so much.
非常感谢。🙏

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timichango picture timichango  ·  3Comments

ghost picture ghost  ·  5Comments

zachwills picture zachwills  ·  4Comments

GuerrillaCoder picture GuerrillaCoder  ·  5Comments

tomjn picture tomjn  ·  3Comments