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.

cPanel has corrupt core MySQL tables - how to fix?

Discussion in 'Database Discussions' started by kpmedia, Nov 9, 2015.

  1. kpmedia

    kpmedia Well-Known Member

    Joined:
    Feb 13, 2011
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA, Europe
    cPanel Access Level:
    Root Administrator
    Horde and Roundcube have corrupted tables from a botched VPS node maintenance (by the host).

    Also these:
    mysql.innodb_index_stats
    mysql.innodb_table_stats
    mysql.slave_master_info
    mysql.slave_relay_log_info
    mysql.slave_worker_info

    I can easily restore the daily backup for domains, but I'm not sure what to do here.

    Can cPanel simply be reinstalled on top of itself, to restore these tables?
    If so, what is the exact command?
     
  2. redesignunit

    redesignunit Member

    Joined:
    Sep 24, 2015
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    you need to repair your table using various command. first of all identify all corrupted tables using myisamchk
    Code:
    # myisamchk /var/lib/mysql/bugs/*.MYI >> /tmp/myisamchk_log.txt
    then repair the corrupted table using myisamchk
    Code:
    # myisamchk -r profiles.MYI
    Perform check and repair together for entire MySQL database
    Code:
    # myisamchk --silent --force --fast --update-state /var/lib/mysql/bugs/*.MYI
    Allocate additional memory for large MySQL database
    Code:
    # myisamchk --silent --force --fast --update-state \
    --key_buffer_size=512M --sort_buffer_size=512M \
    --read_buffer_size=4M --write_buffer_size=4M \
    /var/lib/mysql/bugs/*.MYI
    Use myisamchk to get information about a table
    Code:
    # myisamchk -dvv profiles.MYI
     
  3. kpmedia

    kpmedia Well-Known Member

    Joined:
    Feb 13, 2011
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA, Europe
    cPanel Access Level:
    Root Administrator
    We're already past that stage. It's not a simple "fix it" command.
    The host said I need to reinstall the VPS. I'm hoping that I can simply reinstall cPanel on top of itself.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Forcing a cPanel update might be an option worth trying, but reinstalling cPanel over top of itself, is not.
     
  5. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Enter mysql console, select database, that has errors ("use databasename;") and try running "repair table_name;". If you are thinking about backup restore, you probably should only restore mysql, but if system tables are corrupt, you should fix them first. Force-mysql reinstall might help. If force reinstall would not help, I personally would delete broken mysql tables (or move to other folder), and try to recreate them manually and then restore all mysql backups. It's a tricky thing, but I don't see a reason, why whole VPS should be reinstalled.. It's MySQL problem, weird one, but what's wrong with VPS itself? Sounds more like "easiest thing to do" for the hoster.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page