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

  • 相关阅读:
    Android 源码阅读之MMS细读TransactionService.java
    [Java2 入门经典]第16章 线程
    Android 源码阅读之建立3G网络流程
    从架构上看Android多媒体播放器
    Android 开发日志之仿三星Launcher
    非常适合OA系统的菜单
    模拟动网当前位置下拉菜单
    模拟windows菜单选项卡效果
    TreeView的各种操作
    ASCII表
  • 原文地址:https://www.cnblogs.com/bravehunter/p/5660085.html
Copyright © 2011-2022 走看看