用mysqldump命令备份数据库报如下错误
mysqldump: Got error: 1168: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist when using LOCK TABLES
解决办法:
备份添加–single-transaction参数
# mysqldump -uroot -p --single-transaction example > example.sql
然后报错
mysqldump: Couldn't execute 'show create table `test`': Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist (1168)
去数据库example查询表:test,果然没有这个表。
删除这个表
mysql> drop table test;
重新备份就可以了。