mysqldump 失败并显示“正在跳过表 'table1' 的转储数据,它没有字段"; [英] mysqldump fails with "Skipping dump data for table 'table1', it has no fields"
问题描述
我正在从旧的 mysql 数据库运行 mysqldump.如果重要的话,mysqldump 是 mariadb 发行版的一部分.
I'm running mysqldump from an older mysql database. The mysqldump is part of a mariadb distribution if it matters.
当我在本地运行 mysqldump 时,没问题.当我在远程系统上运行它时,我没有转储任何数据.如果我用 mysqldump -v
运行它,最后一行是
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
推荐答案
来自一些谷歌搜索和这个 reddit 线程,我确定您需要设置默认语言环境.
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
我同时使用了锁表和单事务,因为我混合了 myisam 和 innodb 表.
I used both lock-tables and single transaction because I have a mix of myisam and innodb tables.
这篇关于mysqldump 失败并显示“正在跳过表 'table1' 的转储数据,它没有字段";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!