Bug #45763 import of "mysqldump -all-databases" fails sometimes
Submitted: 25 Jun 2009 17:35 Modified: 1 Aug 2009 19:05
Reporter: Harald Reindl Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.0.83 OS:Linux
Assigned to: CPU Architecture:Any

[25 Jun 2009 17:35] Harald Reindl
Description:
Hi 

We are exporting every hour our database-server with the following commands and import the dump on a backup-machine after rsync. This is because we do not want replication to have a chance user-errors in cms-systems can repaired ina simple way (in most cases without restore a whole backup)

mysqldump --comments=FALSE --compact=TRUE --lock-tables=TRUE --add-locks=TRUE --add-drop-database=TRUE --routines=TRUE --triggers=TRUE --create-options=TRUE --extended-insert=TRUE --hex-blob=TRUE --quote-names=TRUE --disable-keys=TRUE -u backupuser -p**** --all-databases > /Volumes/dune/mysqldump.sql

mysql -e "source /Volumes/dune/mysqldump.sql" -u root -p****

Most time this works fine but sometimes i get errors like the follwoing reported by the cronjob: ERROR 2005 (HY000) at line 57112 in file: '/Volumes/dune/mysqldump.sql': Unknown MySQL server host 'needs' (1)

Is there any workaround? The dump is 800 mb big and contains many customer-data so i have no chance to find out and post details :-(

How to repeat:
make a whole server-dump and import it with mysql-command
fails randomly with different errors

Suggested fix:
some escaping in mysqldump i think here is missing
[25 Jun 2009 21:49] Sveta Smirnova
Thank you for the report.

Which accurate version of MySQL do you use? Do you have BLOB/TEXT columns in the database?
[25 Jun 2009 22:10] Harald Reindl
mysql Ver 14.12 Distrib 5.0.83, for redhat-linux-gnu (x86_64) using readline 5.1
Own RPM based on the fedora10-spec-files

My own applications are only using text (gizp/base64-encoded) but i think it could be the horde-cache-table which has a longblob
[1 Jul 2009 19:05] Sveta Smirnova
Thank you for the feedback.

This is most likely not a bug, but small value of max_allowed_packet. Please try to increase it and inform us if it doesn't solve the problem.
[1 Aug 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".