mysql goes down after reboot

Omar Faruque

Member
Jul 7, 2015
9
0
1
Bangladesh
cPanel Access Level
Root Administrator
Twitter
I am facing serious problem recently i reboot my server then my whm/cpanel Server Status showing mysql down ... and my 5 hosted website goes down due to mysql down ..
My OS is Centos7+Cludlinux installed and whm/cpanel

i use whm restart service for mysql the output was :
======================
Service Error
The “mysql” service failed to start.

Code:
Startup Log
Aug 07 19:59:54 host.mydomain.com systemd[1]: Started MySQL Server.
Aug 07 19:59:54 host.mydomain.com mysqld_safe[30177]: 150807 19:59:54 mysqld_safe Logging to '/var/lib/mysql/host.mydomain.com.err'.
Aug 07 19:59:54 host.mydomain.com mysqld_safe[30177]: 150807 19:59:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Aug 07 19:59:54 host.mydomain.com mysqld_safe[30177]: 150807 19:59:54 mysqld_safe mysqld from pid file /var/lib/mysql/host.mydomain.com.pid ended

Log Messages
150807 19:59:54 mysqld_safe mysqld from pid file /var/lib/mysql/host.mydomain.com.pid ended
150807 19:59:54 [ERROR] /usr/sbin/mysqld: Table './mysql/db' is marked as crashed and should be repaired
150807 19:59:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150807 19:59:39 mysqld_safe mysqld from pid file /var/lib/mysql/host.mydomain.com.pid ended
150807 19:59:39 [ERROR] /usr/sbin/mysqld: Table './mysql/db' is marked as crashed and should be repaired
150807 19:59:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150807 19:59:23 mysqld_safe mysqld from pid file /var/lib/mysql/host.mydomain.com.pid ended
150807 19:59:23 [ERROR] /usr/sbin/mysqld: Table './mysql/db' is marked as crashed and should be repaired
150807 19:59:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150807 19:57:45 mysqld_safe mysqld from pid file /var/lib/mysql/host.mydomain.com.pid ended
150807 19:57:45 [ERROR] /usr/sbin/mysqld: Table './mysql/db' is marked as crashed and should be repaired
150807 19:57:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150807 19:52:44 mysqld_safe mysqld from pid file /var/lib/mysql/host.mydomain.com.pid ended
150807 19:52:44 [ERROR] /usr/sbin/mysqld: Table './mysql/db' is marked as crashed and should be repaired
150807 19:52:43 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150807 19:47:43 mysqld_safe mysqld from pid file /var/lib/mysql/host.mydomain.com.pid ended

mysql has failed. Contact your system administrator if the service does not automagically recover.
======================
14GB RAM
4 XEON processor
Please help me ASAP..
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,211
363
Hello :)

Try repairing the mysql database with a command such as:

Code:
myisamchk -r /var/lib/mysql/mysql/db.MYI
Thank you.
 

Omar Faruque

Member
Jul 7, 2015
9
0
1
Bangladesh
cPanel Access Level
Root Administrator
Twitter
Anyone please help me all my website (3 Wordpress Blog) is down and i am not much expert so please help me to up my website. I am trying to move my 3 website on my another WHM/cpanel server but due to mysql down to current server i am not able to make backup of my 3 Website Database ..Please help me Start mysql or help me to make backup for my website database when mysql is down on current server..Please ! help anyone ...

Hello @cPanelMichael
Thank you for your response now i got this out put :
[email protected] [~]# myisamchk -r /var/lib/mysql/mysql/db.MYI
- recovering (with sort) MyISAM-table '/var/lib/mysql/mysql/db.MYI'
Data records: 109
- Fixing index 1
- Fixing index 2
[email protected] [~]#

Now what ..?

 
Last edited by a moderator:

Omar Faruque

Member
Jul 7, 2015
9
0
1
Bangladesh
cPanel Access Level
Root Administrator
Twitter
Wow.
cPanelMichael

You save me ..thank you so much ..

Now mysql is running by following your given code: myisamchk -r /var/lib/mysql/mysql/db.MYI

I run your code then use restart service for mysql from whm and its done i mean mysql is running ..

Thanks a lot .....
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,211
363
I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.