error on optimize and repair all databases

Masimo

Well-Known Member
Nov 19, 2015
70
2
8
Tbilisi
cPanel Access Level
Root Administrator
MySQL crashed and too many databases need to be repair.

Sample logs:
Code:
2016-02-05 16:08:31 19683 [ERROR] /usr/sbin/mysqld: Table './markerd_mtn/mtn_session' is marked as crashed and should be repaired
2016-02-05 16:08:31 19683 [ERROR] /usr/sbin/mysqld: Table './markerd_mtn/mtn_session' is marked as crashed and should be repaired
2016-02-05 16:08:32 19683 [ERROR] /usr/sbin/mysqld: Table './markerd_mtn/mtn_session' is marked as crashed and should be repaired
2016-02-05 16:08:32 19683 [ERROR] /usr/sbin/mysqld: Table './markerd_mtn/mtn_session' is marked as crashed and should be repaired
2016-02-05 16:08:32 19683 [ERROR] /usr/sbin/mysqld: Table './markerd_mtn/mtn_session' is marked as crashed and should be repaired
2016-02-05 16:08:32 19683 [ERROR] /usr/sbin/mysqld: Table './markerd_mtn/mtn_session' is marked as crashed and should be repaired
2016-02-05 16:08:32 19683 [ERROR] /usr/sbin/mysqld: Table './markerd_mtn/mtn_session' is marked as crashed and should be repaired
2016-02-05 16:08:34 19683 [ERROR] /usr/sbin/mysqld: Table './guilansa_jolnew/in7e0_session' is marked as crashed and should be repaired
2016-02-05 16:08:34 19683 [ERROR] /usr/sbin/mysqld: Table './guilansa_jolnew/in7e0_session' is marked as crashed and should be repaired
2016-02-05 16:08:34 19683 [ERROR] /usr/sbin/mysqld: Table './guilansa_jolnew/in7e0_session' is marked as crashed and should be repaired
2016-02-05 16:08:34 19683 [ERROR] /usr/sbin/mysqld: Table './guilansa_jolnew/in7e0_session' is marked as crashed and should be repaired
2016-02-05 16:09:02 19683 [ERROR] /usr/sbin/mysqld: Table './kimiasan_nprz/nprz_session' is marked as crashed and should be repaired
2016-02-05 16:09:02 19683 [ERROR] /usr/sbin/mysqld: Table './kimiasan_nprz/nprz_session' is marked as crashed and should be repaired
2016-02-05 16:09:02 19683 [ERROR] /usr/sbin/mysqld: Table './kimiasan_nprz/nprz_session' is marked as crashed and should be repaired
2016-02-05 16:09:02 19683 [ERROR] /usr/sbin/mysqld: Table './kimiasan_nprz/nprz_session' is marked as crashed and should be repaired
2016-02-05 16:09:02 19683 [ERROR] /usr/sbin/mysqld: Table './kimiasan_nprz/nprz_session' is marked as crashed and should be repaired
2016-02-05 16:10:50 19683 [ERROR] /usr/sbin/mysqld: Table './hydrop_power/hydro_session' is marked as crashed and should be repaired
2016-02-05 16:10:50 19683 [ERROR] /usr/sbin/mysqld: Table './hydrop_power/hydro_session' is marked as crashed and should be repaired
I started to check and repair all databases by following line:

Code:
mysqlcheck -u root -p --auto-repair --optimize --all-databases
Everything is fine (from A-T) till "test_db", Then process stop by following error:

Code:
mysqlcheck: Got error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`com`' at line 1 when executing 'OPTIMIZE TABLE ... '
Whats wrong and how can resolve this problem?

NOTE: mysql "innodb_force_recovery" set to zero.
Databases only working fine on "innodb_force_recovery = 0"

Any idea?
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463