hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

MySQL needs restarting after initial vagrant up (ERROR 2002) - Vlad v1.1.1 #219

Closed dixhuit closed 9 years ago

dixhuit commented 9 years ago

Vlad 1.1.1

Steps to recreate:

  1. Provision new VM
  2. Run MyQSL related drush command (Have reproduced with drush si & drush sql-sync so far)
  3. Get the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Workaround for now:

If you then restart MySQL things will run as they should:

sudo service mysql restart

Subsequent halts, ups & reloads don't seem to require this workaround. Scratch that, I'm having to restart MyQSL every so often.


Vagrant 1.7.2 ansible 1.9.1 configured module search path = None vagrant-cachier (1.2.0) vagrant-hostsupdater (0.0.11) vagrant-share (1.1.4, system) vagrant-triggers (0.5.0)

danylevskyi commented 9 years ago

Today I was working with Vlad 1.1.1 and I can confirm that bug. How to reproduce:

  1. Provision new VM.
  2. Run drush sql-cli < dump.sql
  3. Get the error
dixhuit commented 9 years ago

I've also noticed that when MySQL is running, the D7 site installed in that VM is reeeally slow (this might be isolated to that particular project though).

philipnorton42 commented 9 years ago

I had trouble getting the MySQL role working in the run up to 1.1.1. Most of the trouble was around starting or restarting the server. Restarting the box always worked when done on the server itself though.

I ended up swapping out the service task for a command task that just runs 'service mysql restart'. I'm not sure if this is a Vlad specific bug or an Ansible bug. I just need to isolate the issue really.

There is another call to a service task within the MySQL role that needs swapping out that should help with this. I think.

philipnorton42 commented 9 years ago

Just pushed a bit of a fix for this, could you check to see that everything is ok? If so I'll launch 1.1.2 tomorrow.

dixhuit commented 9 years ago

Just tested latest dev and I get the same error running drush sql-sync.

philipnorton42 commented 9 years ago

I think this is fixed in the current version of dev, I will be tagging a new release this weekend which will include this fix.

dixhuit commented 9 years ago

Closing as this appears to be fixed in current master.