问题
i am trying to dump the BLOB fields from mysql table.
but when i dumping blob records using sqlYog am getting unvaluable data.
How can i backup BLOB type fields?
Note:
BLOB field has image.
回答1:
The official mysqldump utility can dump BLOBs fields without any problem, use -q
or --opt
when you run the backup.
So for example to backup images_table that contains image in BLOB format :
mysqldump --opt -u user -ppass dbname images_table > images.sql
回答2:
the parameter --hex-blob is useful when you intent to import it to another DB like sqlite.
来源:https://stackoverflow.com/questions/9139345/how-can-i-dump-blob-fields-from-mysql-tables