mysqldump with WHERE id IN (SELECT …) yields table “was not locked” error

后端 未结 2 1637
我寻月下人不归
我寻月下人不归 2021-02-07 01:03

I have 2 databases, with ~100,000 rows missing from the table field_collection_item from db1, which I\'d like to repair by exporting from db2

2条回答
  •  梦毁少年i
    2021-02-07 01:28

    If your tables are MyISAM, the safest, easiest way to handle this is to pass the flag --lock-all-tables. If your tables are InnoDB then --single-transaction is better.

提交回复
热议问题