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.

WHM account transfer errors with MySQL 5.5

Discussion in 'General Discussion' started by mindnetcombr, Aug 29, 2013.

  1. mindnetcombr

    mindnetcombr Member

    Joined:
    Sep 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Few days ago I upgraded some servers (always using cpanel release latest) from MySQL 5.1 to 5.5 - no problem with this, all servers running fine with MySQL 5.5.

    But after this upgrade, when I try to transfer one account between servers, using WHM - the transfer script show a lot of errors on databases, like corrupt databases and other stuff.

    Look the log generated by cpanel here: whm_transfer_error - Pastebin.com

    Note: the error occur not only in user database, but in the horde database too - look the log.

    - " warn [pkgacct] horde.turba_objects: mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'horde'': Cannot load from mysql.proc. The table is probably corrupted (1548)"

    First I try to run mysqlcheck on these databases, but no errors are detected. Then I try tansfer other accounts, in other servers - and all transfer fail with the same message: corrupted databases, Cannot load from mysql.proc.

    Im sure all my databases in every server I managed is not corrupted :) Im talking about +40 servers running cpanel.

    To transfer these accounts Im using full backup to generate a backup and transfer the file between the servers, when restore the full backup file on another server, it's all right - no database errors.

    This error happens on every server with MySQL 5.5 on source, and when use whm transfer feature.

    Anyone notice the same behavior?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please try running the following command on the source server:

    Code:
    mysql_upgrade
    Do you notice any error messages when this runs? Also, do you notice any error messages in the MySQL error log (/var/lib/mysql/$hostname.err) when restarting MySQL?

    Thank you.
     
  3. mindnetcombr

    mindnetcombr Member

    Joined:
    Sep 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Hello Michael,

    Thank for help me.

    When I run mysql_upgrade on the source server, result a lot of output with all databases and tables listed.

    I got the latest lines and put here: result_mysql_upgrade - Pastebin.com

    For luck the account Im talking on this post is "xoof" so the this appear on the link above! I not see errors on xoof account databases, on the last lines of mysql_upgrade show repair of 2 tables, but is not from xoof account.

    I looked at error log file (/var/lib/mysql/server.err) and today dont have any errors on xoof account databases, have some errors of the databases listed on the end of mysql_upgrade command.

    So when I try the account, was the "xoof" account - and no errors appear on mysql with this database.

    Important notice is this error occur on the horde databases too, when the xfer process try copy horde data of the user.

    May be Im wrong - but I believe this is some bug, maybe have some syntax changes between 5.1 and 5.5, and after upgrade mysql to 5.5, the whm xfer script is running as mysql 5.1.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It sounds like there may be some database corruption. Do you have InnoDB enabled, and if so, do you notice any InnoDB errors in the MySQL error log? Also, what does your /etc/my.cnf file look like?

    Thank you.
     
  5. mindnetcombr

    mindnetcombr Member

    Joined:
    Sep 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Michael,

    my.cnf of this server:

    [mysqld]
    max_heap_table_size=512M
    table_cache=128
    query_cache_size=16M
    innodb_file_per_table=1
    tmp_table_size=512M
    join_buffer_size=16M
    innodb_buffer_pool_size=768M
    max_connections=500
    default-storage-engine=MyISAM

    (last line added by whm after mysql upgrade to 5.5)

    Well, if this issue is database corruption, so I have a lot of databases with problem, because this issue occur in all servers Im ruuning MySQL 5.5.

    And I dont understand why this error appear only in whm xfer script - when I run a full backup on cpanel, the backup file is generated without errors and I can transfer the full backup file and restore in other server, with full database recovered, no data loss.

    Why full backup on cpanel run without errors and whm xfer script not? Any idea?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The backup generation will complete without failing, but it's likely the databases are not included in that backup archive. Thus, it allows you to restore the account from the archive, but the databases are not restored successfully. Feel free to open a support ticket so we can take a closer look:

    Submit A Ticket

    You can post the ticket number her so we can update this thread with the outcome.

    Thank you.
     
  7. mindnetcombr

    mindnetcombr Member

    Joined:
    Sep 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Michael,

    Of course the database are restored with all data. I compare the database restored, and all data is there, row by row, each table, same byte usage.

    Well dont matter - I will try open a ticket.

    Thank.
     
  8. mindnetcombr

    mindnetcombr Member

    Joined:
    Sep 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Sorry for re-open this old topic, but I have good news for this issue.

    My problem start after upgrade MySQL 5.1 to 5.5 - after this, everytime I need transfer one account between servers, the transfer tool say my database is corrupted and abort the transfer.

    Im sure the databases are not corrupted - and now I found whats happens: when cpanel ugprade from 5.1 to 5.5 the mysql the script dont uptade the schema, this is required for different MySQL server versions.

    So I found this:

    - "mysql_upgrade examines all tables across all databases for incompatibilities with the current version of MySQL Server. mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added."

    and this:

    - "mysql_upgrade should be executed each time you upgrade MySQL. It supersedes the older mysql_fix_privilege_tables script, which should no longer be used."

    To use mysql_upgrade, make sure your MySQL server is running and then invoke mysql_upgrade from the command line tool:

    mysql_upgrade -uroot -p --force

    You should then be prompted to enter the MySQL root's password and mysql_upgrade will check all the databases and tables and fix them where appropriate. You may need to specify the full path to the above command if it's not in the shell's search path.

    RESULT? issue fixed, now I can transfer accounts between servers, using the transfer tool without any warnings and aborts due to corrupt tables.

    Before this, I try run a regular mysqlcheck with repair, but onlye mysql_upgrade fix this issue.

    This script fix the issue on 6 servers.
     
Loading...

Share This Page