Mysqld service will not start after a improper shut down

ok how do I fix mysql server after and improper shutdown? The service won’t start at all. I am getting these a lot with newer builds the older ones didn’t seem to matter when the users did an improper shutdown. I am getting the common error when I try to access the web interface:

FATAL ERROR

DB Error: connect failed

Trace Back

var/www/html/admin/libraries/db_connect.php:63 die_freepbx()
[0]: DB Error: connect failed

/var/www/html/admin/bootstrap.php:98 require_once()
[0]: /var/www/html/admin/libraries/db_connect.php

/etc/freepbx.conf:9 require_once()
[0]: /var/www/html/admin/bootstrap.php

/var/www/html/admin/config.php:109 include_once()
[0]: /etc/freepbx.conf

Try:

mysqlcheck --repair --all-databases

I am getting a ‘Got error: 2002: can’t connect to local MySql server through socket /var/lib/lqsql/mysql.sock (111) when trying to connect’ I can’t get mysqld service to start up if that has to be running to fix this and I am running the 64bit version of FreePBX

run

rm /var/lib/mysql/mysql.sock
service mysqld start

then the previous command

ok, you guys are good here. You just save my a$$. It looks ok I am going to try to make some calls

If you are using the FreePBX Distro make sure you are up to date. Somewhere in one the updates is a script that will auto fix this because the mysql init script tends to not care about stale locks.

I am using the Distro I am on 5.211.65-6 w/all updates. I am only 2 small revions behind. This has happened to like 5 of my boxes since I gone to the 6.x version of Centos.

http://issues.freepbx.org/browse/FPBXDISTRO-61 looks like you are 1 ahead of where it was spotted. Maybe it missed that update.