The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error on optimize and repair all databases

Discussion in 'Database Discussions' started by Masimo, Feb 5, 2016.

  1. Masimo

    Masimo Well-Known Member

    Joined:
    Nov 19, 2015
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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?
     
    #1 Masimo, Feb 5, 2016
    Last edited by a moderator: Feb 5, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page