mysqldump fails with “Skipping dump data for table 'table1', it has no fields”

北战南征 提交于 2021-02-10 15:20:40

问题


I'm running mysqldump from an older mysql database. The mysqldump is part of a mariadb distribution if it matters.

When I run mysqldump locally, it's fine. When I run it on a remote system, I get no data dumped. If I run it with mysqldump -v the last line is

Skipping dump data for table 'table1', it has no fields

回答1:


From some googling and this reddit thread, I determined that you need to set the default locale.

So the command that worked for me was:

mysqldump --default-character-set=latin1 --lock-tables=false --single-transaction=TRUE --host=$HOST --user=$USER --password=$PASSWORD $DB 

I used both lock-tables and single transaction because I have a mix of myisam and innodb tables.



来源:https://stackoverflow.com/questions/54139701/mysqldump-fails-with-skipping-dump-data-for-table-table1-it-has-no-fields

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!