I’m trying to restore a dumpfile.
The source is mysql 5.7 and the destination is mysql 8.0
I get errors because the mysqldump file doesnt lock all necessary tables.
Is there a way to dump or restore so that I don’t get this error?
Or do I just have to manually edit the mysqldump file. There is quite a bit of tables that will hit this error so I would rather not do it manually.
In the sqldump file:
/*!40000 ALTER TABLE
TABLE_A DISABLE KEYS /;
TABLE_A ADD KEY
TABLE_A ADD CONSTRAINT
TABLE_A_FK FOREIGN KEY (
SESSION_ID) ON DELETE CASCADE;
/!40000 ALTER TABLE
TABLE_A ENABLE KEYS */;
its should be LOCK TABLES
so that I dont get the error:
ERROR 1100 (HY000) at line 74: Table ‘TABLE_B’ was not locked with LOCK TABLES