Mysql keeps shutting down

gadalf

Well-Known Member
Jun 8, 2014
50
0
6
cPanel Access Level
Root Administrator
I am getting :
Database connection error (2): Could not connect to MySQL.
Times after time. So I need to restart MySql time after time.
How to investigate which website is causing the problem?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

What's the size of your eximstats database? EX:

Code:
du -sh /var/lib/mysql/eximstats
Thank you.
 

sahostking

Well-Known Member
May 15, 2012
400
28
78
Cape Town, South Africa
cPanel Access Level
Root Administrator
Twitter
Also enable mysql.slow log in my.cnf to catch those slow mysql queries from websites.

Also try running mysqladmin processlist a random times to see - you can even create a php script to check every minute and to inform you of this occurring at the exact time.