Category: MySQL

  • ERROR 2013 (HY000): Lost connection to MySQL server during query

    Recently had a problem with a MySQL iDA backup on a Linux platform. I was seeing a failure where we would get the error below (and per subject) included in the CommVault backup error.

    ERROR 2013 (HY000): Lost connection to MySQL server during query

    Upon further investigation it was determined that the error was being triggered during a MySQL query as performed by the MySQL iDA during backup attempt. When we attempted to do the same query manually against a MySQL connection we’d also get the same error. It was determined from the MySQL iDA logs that the database causing us the problem was called “prod”.

    See the example below;

    # mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 4
    Server version: 5.1.32-community-log MySQL Community Server (GPL)
    
    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
    
    mysql> use prod
    Database changed
    mysql> show table status;
    
    ERROR 2013 (HY000): Lost connection to MySQL server during query

    As you can see the error was reproducible. Further investigation determined that the database was corrupt in some way, as we could see a large number of errors in the MySQL logs. Fix the corruption on the database and/or exclude it from the backups until resolved by the MySQL DBA.

  • MySQL backup via Simpana fails with Error Code 87:15

    So you’ve just deployed the Simpana MySQL iDA and attempt your first backup, however get an error per below;

    Error Code: [87:15]
    
    Description: MySQL Database: [~client~] Data Backup Failed with MySQL Error: [~mysqldump: Got error: 1227: Access denied; you need the RELOAD privilege for this operation when doing refresh ~].

    This failure is talking about the MySQL user that you configured in the GUI for the MySQL iDA. Basically the account lacks “RELOAD” privilege, so you should go fix it up before trying again.