How can i dump blob fields from mysql tables

 ̄綄美尐妖づ 提交于 2019-12-24 02:33:24

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!