I have some tables in MySQL 5.6 that contain large binary data in some fields. I want to know if I can trust dumps created by mysqldump
and be sure that those b
The dumps generated from mysqldump
can be trusted.
To avoid problems with encodings, binary transfers, etc, use the --hex-blob
option, so it translates each byte in a hex number (for example, 'abc' becomes 0x616263). It will make the dump bigger, but it will be the most compatible and secure way to have the info (since it will be pure text, no weird misinterpretations due to special symbols generated with the binary data on a text file).
You can ensure the integrity (and speed up the transfer) of the dump files packing it on a rar or zip file. That way you can easily detect that it didn't get corrupted with the transfer.
When you try to load it on your server, check you have assigned on your my.cnf
server config file
[mysqld]
max_allowed_packet=600M
or more if needed.
BTW right now i just did a migration, and dumped lots of binary data with mysqldump
and it worked perfectly.