-2

Running 14.0.2 LTS version

Server restarted and I was not able to access MYSQL

root@controller:~# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Tried all possible solution provided but nothing seems to be working

root@controller:~# ps -ef | grep mysql
root      7591  6127  0 18:40 pts/4    00:00:00 grep mysql

root@controller:~# kill -9 6127
Killed

root@controller:~# /etc/init.d/mysql start
 * Starting MySQL database server mysqld
   ...fail!

I have multiple tables in the server and reinstalling it is not an option :(

I am running this server as a controller in ICEHOUSE openstack installation.

Please help

2707974
  • 10,363
  • 6
  • 31
  • 44
  • If a re-installation is not an option, then you have the wrong backup strategy. I'm not saying, you should re-install in this situation. – David Foerster Apr 08 '15 at 13:27
  • 1
    possible duplicate of ["Can't connect to local MySQL server through" socket error](http://askubuntu.com/questions/34095/cant-connect-to-local-mysql-server-through-socket-error) – David Foerster Apr 08 '15 at 13:29
  • Can you show us what's in the error log? Otherwise it's a bit difficult to tell why exactly MySQL fails to start. – Jacek Apr 08 '15 at 15:16
  • Please provide some log details as suggested by asphy in order to further help diagnose this. – Ash Apr 08 '15 at 15:40

1 Answers1

2

The MySQL server cannot start for some reason. This reason should be detailed in the MySQL error log, try tailing /var/log/mysql.err for further information.

I've had this happen when some sort of post upgrade action is required. Without seeing the corresponding log entries, however, this would be hard to diagnose.

kelvinelove
  • 1,617
  • 1
  • 16
  • 26
Asphy
  • 21
  • 1
  • Whilst I appreciate this isn't as full an answer as I would have liked to have given, explaining what is happening and exactly where the reason for this can be found for this exact distribution should still be considerably helpful considering the lack of details. (That and the fact that my current reputation means I can't post comments to the question above as I would have preferred to anyway). – Asphy Apr 08 '15 at 15:28