Just in case anyone still cares:
I had the same issue after copying a database directory directly using command
cp -r /path/to/my/database /var/lib/mysql/new_database
If you do this with a database that uses InnoDB
tables, you will get this crazy ‘table does not exist’ error mentioned above.
The issue is that you need the ib*
files in the root of the MySQL datadir (e.g. ibdata1
, ib_logfile0
and ib_logfile1
).
When I copied those it worked for me.