备份MySQL出现Can’t open file when using LOCK TABLES错误

备份MySQL出现Can’t open file when using LOCK TABLES错误


备份数据库出现

mysqldump: Got error: 1016: Can't open file: './ShoppingCart/ShoppingCart_01f8.frm' (errno: 24) when using LOCK TABLES

这样的错误。
 
搜索了一下,发现只要在mysqldump的时候加上--lock-tables=false就可以解决问题。

mysqldump -u root -pMyPassword DbName --lock-tables=false > data.sql