zoukankan      html  css  js  c++  java
  • mysqldump

    数据库的导出

    导出对象说明:

    mysqldump可以针对单个表、多个表、单个数据库、多个数据库、所有数据库进行导出的操作

    shell> mysqldump [options] db_name [tbl_name ...] //导出指定数据库或单个表

    shell> mysqldump [options] --databases db_name ... //导出多个数据库

    shell> mysqldump [options] --all-databases //导出所有

     

    导出完整的数据库的数据不含表结构 

    $ mysqldump -uroot -p -d  -q  t_qipusheng > struct.sql   --- 这种方式导出的表结构会有错误! 有些完全不正确! F×。 是因为带了 -d 吗??

    --no-data, -d:只导出表结构,不含数据

    --add-locks:导出过程中锁定表,完成后回解锁。

    -q:不缓冲查询,直接导出至标准输出 

     

    ·   If your tables are primarily InnoDB tables, or if you have a mix of
               InnoDB and MyISAM tables, consider using the mysqlbackup command of
               the MySQL Enterprise Backup product. (Available as part of the
               Enterprise subscription.) It provides the best performance for
               InnoDB backups with minimal disruption; it can also back up tables
               from MyISAM and other storage engines; and it provides a number of
               convenient options to accommodate different backup scenarios. See
               MySQL Enterprise Backup User's Guide (Version 3.8.2)[1].

           ·   If your tables are primarily MyISAM tables, consider using the
               mysqlhotcopy instead, for better performance than mysqldump of
               backup and restore operations. See mysqlhotcopy(1).

           mysqldump can retrieve and dump table contents row by row, or it can  retrieve the entire content from a table and buffer it in memory before dumping it. Buffering in memory can be a problem if you are dumping    large tables. To dump tables row by row, use the --quick option (or   --opt, which enables --quick). The --opt option (and hence --quick) is enabled by default, so to enable memory buffering, use --skip-quick.


    可参考; http://www.cnblogs.com/zhoujinyi/p/5684903.html

  • 相关阅读:
    restframework 生成接口文档
    django simpleRoute 简化路由
    django 视图GenericView
    备份问题-原生问题
    django 中如何使用celery 和redis
    主外键定义与主从表关系
    django restframework 钩子函数:全局钩子和局部钩子
    QuerySet Django 几个必会方法
    django restframework -模型序列化高级用法终极篇
    django User.objects.get()报错 raise self.model.DoesNotExist手动处理解决办法
  • 原文地址:https://www.cnblogs.com/bravehunter/p/5660085.html
Copyright © 2011-2022 走看看