douzuizhuo0587 2014-08-19 22:18 采纳率: 0%
浏览 62
已采纳

备份没有blob数据的MySQL数据库

Situation: I have a MySQL database that I would like to backup/export as an sql file. The database has a single table in it that contains a longblob field. I want to export the database without the data/contents of the longblob field.

Problem: Not sure how to export the database without the longblog field's data.

Desired result: A shell/php script or command that will create a sql file containing that database backup without the contents of the longblog field.

  • 写回答

1条回答 默认 最新

  • dpylt7626401 2014-08-19 22:22
    关注

    To skip objects by type, use the --skip option with a list of the objects to skip. This enables you to extract a particular set of objects, say, for exporting only events (by excluding all other types). Similarly, to skip creation of UPDATE statements for BLOB data, specify the --skip-blobs option.

    http://dev.mysql.com/doc/mysql-utilities/1.3/en/mysqldbexport.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部