Mysql – (re)creating empty tables in partially restored thesql database fails with “table exists”

backupMySQLperconareplication

Following situation:

I have a MySQL Server (running Percona Server 5.7) set up as a replication slave. This server should hold only a partial replication. To get to this I made a partial backup of another identical slave and applied it to the server (using innobackupex). This is running fine with no problems at all.

The problem that i have now:

There are a few tables that are "slave-specific" that i have to create. Unfortunately when i try to create one of these tables, mysql only creates the tablespace but stops after this, telling me that the table already exists. But in a "show tables" the tables don't show up.

In the mysql data directory only the .ibd files are created for said tables. Deleting these files and trying again doesn't help.

Is there any place where InnoDB saves it's tables that i don't know of? The information_schema database was copied with the backup so maybe there is something left in it but I do not know where that could be.

Best Answer

I solved this by making a complete backup and then truncating the tables that need to be empty on the slave. Partial backup didn't work unfortunately.