MysqldumpParameter description (parameter SourceMysql5.5.19Source code)
Parameters
Parameter description
-- All-databases,-
-- All-tablespaces,-Y
-- No-tablespaces,-y
-- Add-drop-database
-- Add-drop-table
-- Add-locks
-- Allow-keywords
-- Apply-slave-statements
-- Character-sets-dir
-- Comments
-- Compatible
-- Compact
-- Complete-insert,-c
-- Compress,-C
-- Create-options,-
-- Databases,-B
-- Debug
-- Debug-check
-- Debug-info
-- Default-character-set
-- Delayed-insert
-- Delete-master-logs
-- Disable-keys
-- Dump-slave
-- Events,-E
-- Extended-insert,-e
-- Fields-terminated-
-- Fields-enclosed-
-- Fields-optionally-enclosed-
-- Fields-escaped-
-- Flush-logs
-- Flush-privileges
-- Force
-- Help
-- Hex-blob
-- Host,-h
-- Ignore-table
-- Include-master-host-port
-- Insert-ignore
-- Lines-terminated-
-- Lock-all-tables,-x
-- Lock-tables,-l
-- Log-error
-- Master-data
-- Max_allowed_packet
-- Net_buffer_length
-- No-autocommit
-- No-create-db,-n
-- No-create-info,-t
Mysqldump-uroot-p -- host = localhost -- all-databases -- no-create-info
-- No-data,-d
Only the database table structure is exported without exporting any data.
Mysqldump-uroot-p -- host = localhost -- all-databases -- no-data
-- No-set-names,-N
Equivalent to -- skip-set-charset
Mysqldump-uroot-p -- host = localhost -- all-databases -- no-set-names
-- Opt
Equivalent to -- add-drop-table, -- add-locks, -- create-options, -- quick, -- extended-insert, -- lock-tables, -- set-charset, -- disable-keys this option is enabled by default and can be disabled with -- skip-opt.
Mysqldump-uroot-p -- host = localhost -- all-databases -- opt
-- Order-by-primary
If a primary key exists or the first unique key exists, sort the records of each table. It is valid when exporting a MyISAM table to an InnoDB table, but it takes a long time to export the table.
Mysqldump-uroot-p -- host = localhost -- all-databases -- order-by-primary
-- Password,-p
Database connection password
-- Pipe (windowsSystem availability)
Connect to mysql using a named pipe
Mysqldump-uroot-p -- host = localhost -- all-databases -- pipe
-- Port,-P
Database Connection port number
-- Protocol
The connection protocol used, including tcp, socket, pipe, and memory.
Mysqldump-uroot-p -- host = localhost -- all-databases -- protocol = tcp
-- Quick,-q
Directly export the data to the standard output without buffering the query. This option is enabled by default. You can use -- skip-quick to cancel this option.
Mysqldump-uroot-p -- host = localhost -- all-databases
Mysqldump-uroot-p -- host = localhost -- all-databases -- skip-quick
-- Quote-names,-Q
Use (') to cause tables and column names. This option is enabled by default. -- skip-quote-names is used to cancel this option.
Mysqldump-uroot-p -- host = localhost -- all-databases
Mysqldump-uroot-p -- host = localhost -- all-databases -- skip-quote-names
-- Replace
Replace into to replace insert.
Mysqldump-uroot-p -- host = localhost -- all-databases -- replace
-- Result-file,-r
Output directly to the specified file. This option should be used on systems that use carriage return line breaks (\ r \ n) (for example, DOS, Windows ). This option ensures that only one row is used.
Mysqldump-uroot-p -- host = localhost -- all-databases -- result-file =/tmp/mysqldump_result_file.txt
-- Routines,-R
Export stored procedures and user-defined functions.
Mysqldump-uroot-p -- host = localhost -- all-databases -- routines
-- Set-charset
Add 'set NAMES default_character_set 'to the output file. The default value is "open". You can use the -- skip-set-charset option to disable it.
Mysqldump-uroot-p -- host = localhost -- all-databases
Mysqldump-uroot-p -- host = localhost -- all-databases -- skip-set-charset
-- Single-transaction
This option submits a begin SQL statement before exporting data. BEGIN does not block any applications and ensures Database Consistency during export. It is only applicable to multi-version storage engines and only InnoDB. This option and the -- lock-tables option are mutually exclusive, Because lock tables will implicitly commit any pending transactions. To export a large table, use the -- quick option.
Mysqldump-uroot-p -- host = localhost -- all-databases -- single-transaction
-- Dump-date
Add the export time to the output file. The default value is "Open", and the -- skip-dump-date option is used to disable it.
Mysqldump-uroot-p -- host = localhost -- all-databases
Mysqldump-uroot-p -- host = localhost -- all-databases -- skip-dump-date
-- Skip-opt
Disable the-opt option.
Mysqldump-uroot-p -- host = localhost -- all-databases -- skip-opt
-- Socket,-S
Specifies the location of the socket file connecting to mysql. The default path is/tmp/mysql. sock.
Mysqldump-uroot-p -- host = localhost -- all-databases -- socket =/tmp/mysqld. sock
-- Tab,-T
Create a tab-separated text file for each table in the given path. Note: It is only used for mysqldump and mysqld servers to run on the same machine.
Mysqldump-uroot-p -- host = localhost test -- tab = "/home/mysql"
-- Tables
Overwrite the -- databases (-B) parameter and specify the name of the table to be exported.
Mysqldump-uroot-p -- host = localhost -- databases test -- tables test
-- Triggers
Export trigger. This option is enabled by default. Use -- skip-triggers to disable it.
Mysqldump-uroot-p -- host = localhost -- all-databases -- triggers
-- Tz-utc
Set TIME_ZONE = '+' At the top of the export to ensure the correctness of TIMESTAMP data exported in different time zones or when the data is moved to other time zones.
Mysqldump-uroot-p -- host = localhost -- all-databases -- tz-utc
-- User,-u
Specify the connection user name.
-- Verbose, -- v
Outputs multiple platform information.
-- Version,-V
Output The mysqldump version information and exit
-- Where,-w
Only records selected by the WHERE condition are dumped. Note that if the condition contains special spaces or characters for the command interpreter, you must reference the condition.
Mysqldump-uroot-p -- host = localhost -- all-databases -- where = "user = 'root '"
-- Xml,-X
Export XML format.
Mysqldump-uroot-p -- host = localhost -- all-databases -- xml
-- Plugin_dir
Client plug-in directory, used to be compatible with different plug-in versions.
Mysqldump-uroot-p -- host = localhost -- all-databases -- plugin_dir = "/usr/local/lib/plugin"
-- Default_auth
Default Client plug-in permission.
Mysqldump-uroot-p -- host = localhost -- all-databases -- default-auth = "/usr/local/lib/plugin/<PLUGIN>"