Backup fails on mysql tables after renaming user account

JeffreydeV

Verified User
Joined
Dec 20, 2010
Messages
11
Location
Denmark
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?
 
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:
Back
Top