I've followed all the instructions, however if I try to log in or try to access phpMyAdmin I receive an error that says "#2002 - Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) The server is not responding (or the local server's socket is not correctly configured)."


I even checked the path /var/run/mysqld and the file aforemetioned "mysqld.sock" does not exist.

Before marking my post as a duplicate, none of the other topics propose some actual solutions. I've also updated the appliance twice today to make sure.

EDIT - I've tried to reinstall the database per the instructions here pset7 phpMyAdmin errors on loading pset7.sql but I receive the same error. I've then hit ok then retry and the socket is still missing. Most importantly, when I boot the appliance there's a line "Starting MySQL service = [fail]" rather than "[OK]" error

1 Answer 1


I'm sorry if it's not appropriate to answer your own question but I'd like to post the solution to this problem just in case someone has the same issue.

The commands

sudo /etc/init.d/mysql start
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql restart

solve the issue.

  • Answering your own question is both appropriate and invited, especially with these environment questions that are less likely to find a successful answer. Please remember to accept your answer later so that it is removed from the unanswered question queue. (The system usually won't let you do so for about 2 days.)
    – Cliff B
    Commented Dec 11, 2015 at 18:08
  • Sure, no problem.
    – Gabriel
    Commented Dec 11, 2015 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .