I'm trying to dump a bugzilla installation to a file, then restore it
to a different database name (so as to test my db backup system).
I use mysqldump to dump it to a file:
# mysqldump -u root -p<passwd> (misc. options) bugs > bugs.sql
Then try to restore it to an empty DB, "foobar" with this command
# mysql -u root -p<passwd> foobar < bugs.sql
It fails, with this not-too-helpful error:
ERROR at line 163:
The failure is in the first table from bugzilla, "attachments", which
has a blob field called "the_data" of which I have no doubt is the
cause of the failure. I'm hypothesizing that it's failing because of
newline characters in the the_data field of some records, but I have
not been able to confirm that.
I have tried the following mysqldump options in varying combinations,
and none helped the issue:
--extended-insert
--quote-names
--opt
--set-variable 'net_buffer_length = 1048576'
If I skip the attachments table in the mysqldump the database restores
perfectly.
Anyone have any ideas how to solve this issue? If not, how to debug it
further? I'm seriously stuck.
My mysql server is 3.23.58
thanks,
Ben