Results 1 to 3 of 3

Thread: Backup fails on mysql tables after renaming user account

  1. #1
    Join Date
    Dec 2010
    Location
    Denmark
    Posts
    10

    Backup fails on mysql tables after renaming user account

    Hello, a few days ago I have renamed some of my directadmin user accounts using change_username.sh.

    Everything went well except for a few tables in mysql. Those that used a different engine (InnoDB instead of the standard MyISAM) are not showing anymore (in phpmyadmin, aswell in it's own database and the information scheme). At first this wasn't really a problem since these tables where only there for testing.
    However now my backups fail.

    I get the following message:

    Error while backing up database sql02_000000002
    mysqldump error output: mysqldump: Got error: 1146: Table 'sql02_000000002.dataPageBlock' doesn't exist when using LOCK TABLES

    Does anyone know how I can show these tables again so I can remove them?
    Or how I just remove them in the first place?

  2. #2
    Join Date
    Aug 2008
    Posts
    4,697
    You might need to run a repair database

  3. #3
    Join Date
    Dec 2010
    Location
    Denmark
    Posts
    10
    Thank you for your suggestion

    I tried the following:

    Code:
    mysqlcheck -u[user] -p[password] --check --auto-repair --all-databases
    While checking the databases it shows:

    Code:
    sql02_000000002.dataPageBlock
    Error    : Table 'sql02_000000002.dataPageBlock' doesn't exist
    error    : Corrupt
    And at the end of the file:

    Code:
    Repairing tables
    sql02_000000002.dataPageBlock
    Error    : Table 'sql02_000000002.dataPageBlock' doesn't exist
    error    : Corrupt
    I have a feeling that even though the database name now has changed to sql02_000000002 that its internal name(?) is still the old database name.
    However I have no idea how I could check this.

    -- edit --
    Also when I login using da_admin to mysql and try to drop the specific table it gives me the following message:
    Code:
    Unknown table 'dataPageBlock'
    -- solution --

    What I did to make it work again:

    Code:
    DROP TABLE dataPageBlock;
    You will get an error:
    Code:
    Unknown table 'dataPageBlock'
    Then recreate the table (if you skip the first step you will get an error here):
    Code:
    CREATE TABLE IF NOT EXISTS `dataPageBlock` (
      `id` int(11) NOT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    Then I ran the mysql repair tool:
    Code:
    mysqlcheck -u[user] -p[password] --check --auto-repair --all-databases
    And dropped the table again:
    Code:
    DROP TABLE dataPageBlock;
    Now without getting the error.
    Last edited by JeffreydeV; 05-10-2012 at 01:44 AM. Reason: solution

Similar Threads

  1. Reseller (and user) backup fails, spaces in path
    By Laurens in forum Admin-Level Difficulties
    Replies: 4
    Last Post: 10-22-2011, 08:55 AM
  2. Replies: 3
    Last Post: 11-18-2010, 03:06 AM
  3. Renaming user
    By giordando in forum User-Level Difficulties
    Replies: 2
    Last Post: 09-11-2008, 08:30 AM
  4. Renaming of admin user
    By ostendo in forum General Technical Discussion & Troubleshooting
    Replies: 3
    Last Post: 01-24-2008, 01:34 AM
  5. Reseller level backup fails due to user disk quota
    By eroloz in forum Reseller-Level Difficulties
    Replies: 0
    Last Post: 10-28-2005, 10:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •