SQL Crash - Ast 13.32 FreePBX 14


Server ran out of disk, triggering a SQL crash. Made space, SQL didn’t recover.

/var/lib/mysql/mysql.sock doesn’t exist to mv or rm (historically, mv or rm with service stops and restarts fixed things).

Been experiencing this on a couple servers with updated modules now. Anyone else been experiencing this?

(Dave Burgess) #2

It’s been doing that for the past 25 years. Run the DB out of space, DB gods become angry.

There’s a “fwconsole database repairall” commnd that you can try, but if the DB isn’t restarting, it might not be enough. Remove the /var/lib/mysql/mysql.sock file from the system and try again. You may also need to make sure that the /var/lib/mysql directory is intact.


The downside with fwconsole commands is that it requires the very SQL connection that’s broken.

In this case, the removal of /var/lib/mysql/mysql.sock doesn’t resolve the issue. For older systems, that solution worked great.

I suppose not running out of disk is a solution haha


Install logwatch and stay informed as to disk space

add a crontab

20 16 * * * if  [ $(df /|tail -1|awk '{print $5}'|tr -d '%') -ge 90 ];then df /;fi

will email your MAILTO if the disk getsabove 90% full

(Dave Burgess) #5

You’re going to have to deep-dive into the MySQL world to get back to where you need to be. A lot depends on what the error actually is, which you’re going to get from the /var/log/mysql/*err file. After looking at that, see if you can get it back from that error.

(system) closed #6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.