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

  • 相关阅读:
    ReportingService 通过RowNumber函数获取行号和生成隔行变色样式
    C#中Attribute的继承
    在ASP.NET非MVC环境中(WebForm中)构造MVC的URL参数,以及如何根据URL解析出匹配到MVC路由的Controller和Action
    _kbhit() for linux
    pthread_create用法(转)
    XACT Q&A (转)
    libcurl使用心得-包括下载文件不存在处理相关(转)
    2013总结-2014展望
    curl常用设置-涉及超时相关
    一行代码让App运行时iPhone不会进入锁屏待机状态
  • 原文地址:https://www.cnblogs.com/bravehunter/p/5660085.html
Copyright © 2011-2022 走看看