`

mysql的dump

阅读更多
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\thatday>mysqldump --help
mysqldump  Ver 10.9 Distrib 4.1.15, for Win32 (ia32)
By Igor Romanenko, Monty, Jani & Sinisa
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Dumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]
OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR     mysqldump [OPTIONS] --all-databases [OPTIONS]

Default options are read from the following files in the given order:
C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf
The following groups are read: mysqldump client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit
--no-defaults           Don't read default options from any options file
--defaults-file=#       Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read
  -a, --all           Deprecated. Use --create-options instead.
  -A, --all-databases Dump all the databases. This will be same as --databases
                      with all databases selected.
  --add-drop-database Add a 'DROP DATABASE' before each create.
  --add-drop-table    Add a 'drop table' before each create.
  --add-locks         Add locks around insert statements.
  --allow-keywords    Allow creation of column names that are keywords.
  --character-sets-dir=name
                      Directory where character sets are.
  -i, --comments      Write additional information.
  --compatible=name   Change the dump to be compatible with a given mode. By
                      default tables are dumped in a format optimized for
                      MySQL. Legal modes are: ansi, mysql323, mysql40,
                      postgresql, oracle, mssql, db2, maxdb, no_key_options,
                      no_table_options, no_field_options. One can use several
                      modes separated by commas. Note: Requires MySQL server
                      version 4.1.0 or higher. This option is ignored with
                      earlier server versions.
  --compact           Give less verbose output (useful for debugging). Disables
                      structure comments and header/footer constructs.  Enables
                      options --skip-add-drop-table --no-set-names
                      --skip-disable-keys --skip-add-locks
  -c, --complete-insert
                      Use complete insert statements.
  -C, --compress      Use compression in server/client protocol.
  --create-options    Include all MySQL specific create options.
  -B, --databases     To dump several databases. Note the difference in usage;
                      In this case no tables are given. All name arguments are
                      regarded as databasenames. 'USE db_name;' will be
                      included in the output.
  -#, --debug[=#]     This is a non-debug version. Catch this and exit
  --default-character-set=name
                      Set the default character set.
  --delayed-insert    Insert rows with INSERT DELAYED.
  --delete-master-logs
                      Delete logs on master after backup. This automatically
                      enables --master-data.
  -K, --disable-keys  '/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and
                      '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put
                      in the output.
  -e, --extended-insert
                      Allows utilization of the new, much faster INSERT syntax.
  --fields-terminated-by=name
                      Fields in the textfile are terminated by ...
  --fields-enclosed-by=name
                      Fields in the importfile are enclosed by ...
  --fields-optionally-enclosed-by=name
                      Fields in the i.file are opt. enclosed by ...
  --fields-escaped-by=name
                      Fields in the i.file are escaped by ...
  -x, --first-slave   Deprecated, renamed to --lock-all-tables.
  -F, --flush-logs    Flush logs file in server before starting dump. Note that
                      if you dump many databases at once (using the option
                      --databases= or --all-databases), the logs will be
                      flushed for each database dumped. The exception is when
                      using --lock-all-tables or --master-data: in this case
                      the logs will be flushed only once, corresponding to the
                      moment all tables are locked. So if you want your dump
                      and the log flush to happen at the same exact moment you
                      should use --lock-all-tables or --master-data with
                      --flush-logs
  -f, --force         Continue even if we get an sql-error.
  -?, --help          Display this help message and exit.
  --hex-blob          Dump binary strings (BINARY, VARBINARY, BLOB) in
                      hexadecimal format.
  -h, --host=name     Connect to host.
  --ignore-table=name Do not dump the specified table. To specify more than one
                      table to ignore, use the directive multiple times, once
                      for each table.  Each table must be specified with both
                      database and table names, e.g.
                      --ignore-table=database.table
  --insert-ignore     Insert rows with INSERT IGNORE.
  --lines-terminated-by=name
                      Lines in the i.file are terminated by ...
  -x, --lock-all-tables
                      Locks all tables across all databases. This is achieved
                      by taking a global read lock for the duration of the
                      whole dump. Automatically turns --single-transaction and
                      --lock-tables off.
  -l, --lock-tables   Lock all tables for read.
  --master-data[=#]   This causes the binary log position and filename to be
                      appended to the output. If equal to 1, will print it as a
                      CHANGE MASTER command; if equal to 2, that command will
                      be prefixed with a comment symbol. This option will turn
                      --lock-all-tables on, unless --single-transaction is
                      specified too (in which case a global read lock is only
                      taken a short time at the beginning of the dump - don't
                      forget to read about --single-transaction below). In all
                      cases any action on logs will happen at the exact moment
                      of the dump.Option automatically turns --lock-tables off.
  --max_allowed_packet=#
  --net_buffer_length=#
  --no-autocommit     Wrap tables with autocommit/commit statements.
  -n, --no-create-db  'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will
                      not be put in the output. The above line will be added
                      otherwise, if --databases or --all-databases option was
                      given.}.
  -t, --no-create-info
                      Don't write table creation info.
  -d, --no-data       No row information.
  -N, --no-set-names  Deprecated. Use --skip-set-charset instead.
  --opt               Same as --add-drop-table, --add-locks, --create-options,
                      --quick, --extended-insert, --lock-tables, --set-charset,
                      and --disable-keys. Enabled by default, disable with
                      --skip-opt.
  --order-by-primary  Sorts each table's rows by primary key, or first unique
                      key, if such a key exists.  Useful when dumping a MyISAM
                      table to be loaded into an InnoDB table, but will make
                      the dump itself take considerably longer.
  -p, --password[=name]
                      Password to use when connecting to server. If password is
                      not given it's solicited on the tty.
  -W, --pipe          Use named pipes to connect to server.
  -P, --port=#        Port number to use for connection.
  --protocol=name     The protocol of connection (tcp,socket,pipe,memory).
  -q, --quick         Don't buffer query, dump directly to stdout.
  -Q, --quote-names   Quote table and column names with backticks (`).
  -r, --result-file=name
                      Direct output to a given file. This option should be used
                      in MSDOS, because it prevents new line '\n' from being
                      converted to '\r\n' (carriage return + line feed).
  --set-charset       Add 'SET NAMES default_character_set' to the output.
                      Enabled by default; suppress with --skip-set-charset.
  -O, --set-variable=name
                      Change the value of a variable. Please note that this
                      option is deprecated; you can set variables directly with
                      --variable-name=value.
  --shared-memory-base-name=name
                      Base name of shared memory.
  --single-transaction
                      Creates a consistent snapshot by dumping all tables in a
                      single transaction. Works ONLY for tables stored in
                      storage engines which support multiversioning (currently
                      only InnoDB does); the dump is NOT guaranteed to be
                      consistent for other storage engines. Option
                      automatically turns off --lock-tables.
  --skip-opt          Disable --opt. Disables --add-drop-table, --add-locks,
                      --create-options, --quick, --extended-insert,
                      --lock-tables, --set-charset, and --disable-keys.
  -S, --socket=name   Socket file to use for connection.
  -T, --tab=name      Creates tab separated textfile for each table to given
                      path. (creates .sql and .txt files). NOTE: This only
                      works if mysqldump is run on the same machine as the
                      mysqld daemon.
  --tables            Overrides option --databases (-B).
  -u, --user=name     User for login if not current user.
  -v, --verbose       Print info about the various stages.
  -V, --version       Output version information and exit.
  -w, --where=name    Dump only selected records; QUOTES mandatory!
  -X, --xml           Dump a database as well formed XML.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- -----------------------------
all                               TRUE
all-databases                     FALSE
add-drop-database                 FALSE
add-drop-table                    TRUE
add-locks                         TRUE
allow-keywords                    FALSE
character-sets-dir                (No default value)
comments                          TRUE
compatible                        (No default value)
compact                           FALSE
complete-insert                   FALSE
compress                          FALSE
create-options                    TRUE
databases                         FALSE
default-character-set             utf8
delayed-insert                    FALSE
delete-master-logs                FALSE
disable-keys                      TRUE
extended-insert                   TRUE
fields-terminated-by              (No default value)
fields-enclosed-by                (No default value)
fields-optionally-enclosed-by     (No default value)
fields-escaped-by                 (No default value)
first-slave                       FALSE
flush-logs                        FALSE
force                             FALSE
hex-blob                          FALSE
host                              (No default value)
insert-ignore                     FALSE
lines-terminated-by               (No default value)
lock-all-tables                   FALSE
lock-tables                       TRUE
master-data                       0
max_allowed_packet                25165824
net_buffer_length                 1047551
no-autocommit                     FALSE
no-create-db                      FALSE
no-create-info                    FALSE
no-data                           FALSE
order-by-primary                  FALSE
port                              3306
quick                             TRUE
quote-names                       TRUE
set-charset                       TRUE
shared-memory-base-name           (No default value)
single-transaction                FALSE
socket                            (No default value)
tab                               (No default value)
user                              (No default value)
verbose                           FALSE
where                             (No default value)

分享到:
评论

相关推荐

    mi Mysql Dump-开源

    【mi Mysql Dump 开源项目详解】 `mi Mysql Dump` 是一个专为 PHP-4 平台设计的开源库,其主要目的是在不依赖外部工具如 `mysqldump` 的情况下,从 PHP 程序内部实现 MySQL 数据库的转储功能。这个库的出现,对于...

    MySql 5.6.40 win64位

    MySQL是世界上最受欢迎的开源关系型数据库管理系统之一,尤其在Web应用程序开发中占据着核心地位。本文将详细讨论MySQL 5.6.40这一早期版本,以及在Windows 64位系统上的安装与配置。 MySQL 5.6是MySQL的一个重大...

    go-mysql-dump-to-gdrive:Google Drive 上的简单 MySql 转储

    go run go-mysql-dump-to-gdrive --help 参数 -db="": 数据库名称 -db-host="localhost":MySql 转储主机的名称 -db-user="": 你的 MySql dump USER 的名字 -dump-all=false: 如果设置脚本转储所有 MySql 数据库 -...

    ssh-mysql-dump:从远程服务器将mysql数据库转储到本地的脚本

    ssh-mysql-dump 项目名称:MySQL远程转储作者:Sakib Iqbal作者电子邮件: 简短说明:将mysql数据库从远程服务器转储到本地的脚本。 脚本语言:Python 2.7依赖关系:paramiko,setuptools Idel场景和依赖性: 服务器...

    mysql数据库自动备份脚本--dump.sh

    1、可以自动备份; 2、显示备份数据库大小; 3、记录备份日志; 4、自动管理数据文件。

    mysql导出指定数据或部份数据的方法

    在MySQL数据库管理中,有时我们需要导出特定的数据或者部分数据,而不是整个数据库。传统的`mysqldump`工具虽然强大,但并不适用于这种情况。本文将介绍三种方法来解决这一问题。 **方法一:使用INSERT INTO......

    mysqldumpsplitter:MySQL Dump拆分器,用于从mysqldump拆分提取数据库和表

    - "dump-splitter":指的就是像mysqldumpsplitter这样的拆分工具。 - "MySQLShell":是一个高级的MySQL管理工具,虽然不是直接相关的,但可以与mysqldumpsplitter配合使用。 5. **文件名称列表**: - ...

    mysql和mysqldump文件.zip

    MySQL是一种广泛使用的开源关系型数据库管理系统(RDBMS),它基于结构化查询语言(SQL)进行数据操作。MySQL因其高效、稳定和易于管理的特点,在Web应用程序中尤其受到青睐。而`mysqldump`是MySQL提供的一款强大的...

    Mysql数据库全量和增量备份

    MySQL 数据库全量和增量备份 MySQL 数据库全量和增量备份是指对 MySQL 数据库进行的完整备份和增量备份,以确保数据的安全和可靠性。本篇文章将对 MySQL 全量和增量备份进行详细的介绍,包括 binlog 日志的说明、...

    Mysql数据库导入Oracle

    MySQL到Oracle的数据迁移是一项常见的任务,特别是在企业级应用中,可能因为业务需求或者系统升级而需要将数据从MySQL迁移到Oracle。在这个过程中,我们需要了解两者之间的差异,以及如何有效地进行数据转换和导入。...

    为MySQL系统做体检.pdf

    "MySQL系统体检" MySQL是一个关系型数据库管理系统,用于...本节中我们学习了如何对MySQL系统进行体检,包括删除数据库、查看数据库列表、使用phpinfo函数查看服务器信息、创建数据库和用户、使用MySQL dump文件等。

    MySQL 5 rpm版本 for linux安装.docx

    在Linux系统中安装MySQL 5 RPM版本的过程是一个关键任务,特别是对于那些依赖于数据库服务的IT环境。以下是一个详细的步骤指南: 首先,你需要从MySQL的官方网站(http://www.mysql.com/downloads/)下载适用于...

    Laravel开发-mysql-dump

    `mysql-dump`工具提供了一种便捷的方式,允许开发者在Laravel 5环境中自动化地备份MySQL数据库。这个包旨在简化数据库的转储过程,使得数据能够被安全地存储在本地或者上传至云端,为开发、测试和生产环境提供了灵活...

    Adminer便捷管理MySQL数据库

    ### Adminer便捷管理MySQL数据库 #### 一、Adminer简介 Adminer是一款非常轻便且功能强大的数据库管理工具,能够帮助用户高效地管理和操作MySQL数据库。相比于常见的phpMyAdmin,Adminer仅由一个PHP文件组成,这...

    MySQL 数据库分表分区.pdf

    日常开发中我们经常会遇到大表的情况,所谓的大表是指存储了百万级乃至千万级条记录的表。这样的表过于庞大,导致数据库在查询和插入的时候耗时太长,性能低下,如果涉及联合查询的情况,性能会更加糟糕。...

    Linux下MySQL数据库使用coredump注意事项

    在Linux环境下,MySQL数据库的使用过程中,遇到故障或者异常情况时,我们可能需要利用coredump来分析程序崩溃的原因。coredump是系统记录进程崩溃时内存状态的文件,它可以帮助开发者定位问题所在。以下是对在Linux...

    Mysql错误1366 – Incorrect integer value解决方法

    由于这个数据库服务器存放的数据库比较多且都是小数据库,所以最初的时候是运行在windows服务器上的。前一段时间由于机房服务器要做调整,于是我便在一个夜深人静的夜晚对数据库进行的迁移及前台应用程序进行了调整...

    mysql数据库导入工具 bigdump.php

    mysql 数据库导入工具, 可以免错导入

    mysql-dump-split:Ruby脚本,将MySQL转储分为每个表一个文件

    用法: 首先,您需要一个mysqldump文件,将其放入您想要所有拆分文件所在的目录中: $ ruby split-mysql-dump.rb db.sqlFound a new db: appFound a new table: administrator_log writing line: 229 200.494MB in 4...

    Linux下定时备份MySQL数据库的Shell脚本.pdf

    ##### 2.2 MySQL Dump选项 - `-u $USER`: 指定MySQL用户名。 - `-p $PASSWORD`: 指定MySQL用户密码。 - `--opt`: 启用优化选项,包括快速模式等。 - `--extended-insert=false`: 禁用扩展插入语句,避免在导入大文件...

Global site tag (gtag.js) - Google Analytics