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

  • 相关阅读:
    DHCP服务器搭建
    linux文件通配符
    NTP服务器搭建
    .Net下MoongoDB的简单调用
    Mac 下安装配置MongoDB讲解
    Redis 介绍学习
    PostgreSQL学习之路一 安装
    CentOS安装PostgreSQL
    离线安装PostgreSQL11.6
    PostgreSQL 安装扩展插件plpython3u执行python,访问页面或者第三方程序
  • 原文地址:https://www.cnblogs.com/bravehunter/p/5660085.html
Copyright © 2011-2022 走看看