mysqldump:写入时出现 errno 32

mysqldump: Got errno 32 on write(mysqldump:写入时出现 errno 32)

本文介绍了mysqldump:写入时出现 errno 32的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 VPS 上使用这个脚本多年.它仍然有效.

I used this script for years on my VPS. And it's still working.

DBLIST=`mysql -uroot -pROOT_PASSWORD -ANe"SELECT GROUP_CONCAT(schema_name) FROM information_schema.schemata WHERE schema_name NOT IN ('information_schema','performance_schema')" | sed 's/,/ /g'`
MYSQLDUMP_OPTIONS="-uroot -pROOT_PASSWORD --single-transaction --routines --triggers"
BACKUP_DEST="/home/backup/db/"
for DB in `echo "${DBLIST}"`
do
    mysqldump ${MYSQLDUMP_OPTIONS} ${DB} | gzip > ${BACKUP_DEST}/${DB}.sql.gz &
done
wait
tar -czvf /home/backup/db2/`date +\%G-\%m-\%d`_db.tar.gz ${BACKUP_DEST}

现在我要搬到另一个主机.我正在尝试使用相同的脚本(当然,我使用新凭据更改了 ROOT_PASSWORD),但我不知道为什么会这样:

Now I'm moving to another hosting. I 'm trying to use the same script (of course I changed ROOT_PASSWORD with the new credentials) but I don't know why I get this:

mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write
mysqldump: Got errno 32 on write

推荐答案

20:47:59 0 ~] $ perror 32
OS error code  32:  Broken pipe

所以 errno 32 是断管".您将 mysqldump 输出通过管道传输到 gzip ,因此这意味着 gzip 在 mysqldump 完成之前终止.可以例如是因为您的磁盘已满,或者 gzip 超过了您的主机设置的任何最大 CPU 时间/使用率.

So errno 32 is "broken pipe". You're piping the mysqldump output to gzip , so this means gzip terminated prior to mysqldump finished. Could e.g. be because your disk is full, or gzip surpassed any max CPU time/usage your host has in place.

这篇关于mysqldump:写入时出现 errno 32的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:mysqldump:写入时出现 errno 32

基础教程推荐