简体   繁体   中英

mysqldump backup is missing all innodb tables but not MyISAM tables

Here are the switches I'm using with mysqldump to backup my database:

/usr/bin/mysqldump -u **** --password=**** --single-transaction --database ****  > /filepath/filename.sql

I'm importing into my local database using windows (server is linux) with:

mysql -u root 

use databasename

source c:/filepath/filename.sql

when I compare the server database verse the local, innodb tables are missing, below is the result of 'show engines;' on the local database:

显示引擎

It could be the --single-transaction option. Is it possible that you're altering the table while you did the dump? If so the alter table would be done outside of the transaction. It will create a temporary table, drop the original and rename the temp table. Since the original table is "gone", it will not be put in the dump file.

You can try using --lock-tables instead and see if that works.

最后,我通过完全擦除本地数据库然后从备份中重新加载数据库来解决此问题,不知道为什么本地数据库未显示innodb表,但已修复

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM