0

aaa Table in use, aaa2 Table backed up a few days ago

I copied it to "cp aaa aaa2". I have accidentally changed the aaa table data. aaa can not kill because it has recent data.

aaa2 is an "in use" 1932 error in phpmyadmin.

How can I recover aaa2?

Error message:
Error: Table 'db.aaa2' doesn't exist in engine
status: Operation failed

The engine is InnoDB.

======================================================

I go ahead and add more.

aaa.table AUTO_INCREMENT 10000
aaa2.table AUTO_INCREMENT 95000

I made another mistake. I did not mysqldump aaa(1) and copied the file elsewhere.

And Renamed aaa2(2) to aaa(2). aaa(2) worked fine.

There was a problem. I dumped aaa(2) to mysqldump and deleted the file. I copied aaa(1) again, but it does not recover because of an "in use" error.

DR.SA
  • 1
  • 2

1 Answers1

0

Assuming the table is ENGINE=InnoDB, you cannot simply copy the file.

Plan A: Dump and reload (careful with the table name).

Plan B: Use "transportable tablespaces".

Rick James
  • 135,179
  • 13
  • 127
  • 222