mysqldump命令參數(shù)
mysql?
mysqldump客戶端可用來轉(zhuǎn)儲數(shù)據(jù)庫或搜集數(shù)據(jù)庫進(jìn)行備份或?qū)?shù)據(jù)轉(zhuǎn)移到另一個SQL服務(wù)器(不一定是一個MySQL服務(wù)器)。轉(zhuǎn)儲包含創(chuàng)建表和/或裝載表的SQL語句。?
如果你在服務(wù)器上進(jìn)行備份,并且表均為MyISAM表,應(yīng)考慮使用mysqlhotcopy,因為可以更快地進(jìn)行備份和恢復(fù)。?
有3種方式來調(diào)用mysqldump:
shell> mysqldump [options] db_name [tables] shell> mysqldump [options] ---database DB1 [DB2 DB3...] shell> mysqldump [options] --all--database
如果沒有指定任何表或使用了---database或--all--database選項,則轉(zhuǎn)儲整個數(shù)據(jù)庫。?
要想獲得你的版本的mysqldump支持的選項,執(zhí)行mysqldump ---help。?
如果運行mysqldump沒有--quick或--opt選項,mysqldump在轉(zhuǎn)儲結(jié)果前將整個結(jié)果集裝入內(nèi)存。如果轉(zhuǎn)儲大數(shù)據(jù)庫可能會出現(xiàn)問題。該選項默認(rèn)啟用,但可以用–skip-opt禁用。?
如果使用最新版本的mysqldump程序生成一個轉(zhuǎn)儲重裝到很舊版本的MySQL服務(wù)器中,不應(yīng)使用–opt或-e選項。
mysqldump支持下面的選項:
1、--print-defaults Print the program argument list and exit.
打印程序參數(shù)列表并退出
2、--no-defaults Don't read default options from any option file
已不從任何選項文件讀取默認(rèn)選項
3、--defaults-file=# Only read default options from the given file #.
只有給指定的文件讀取默認(rèn)選項
4、--defaults-extra-file=# Read this file after the global files are read.
在全局下面讀取這個文件
5、-A, --all-databases Dump all the databases. This will be same as --databases
所有的數(shù)據(jù)庫
6、-Y, --all-tablespaces Dump all the tablespaces.
導(dǎo)出全部表空間
7、-y, --no-tablespaces Do not dump any tablespace information.
不導(dǎo)出任何表空間
8、--add-drop-database Add a DROP DATABASE before each create.
每個數(shù)據(jù)庫創(chuàng)建之前添加drop數(shù)據(jù)庫語句
9、--add-drop-table Add a DROP TABLE before each create.
每個數(shù)據(jù)表創(chuàng)建之前添加drop數(shù)據(jù)表語句。(默認(rèn)為打開狀態(tài),使用–sjip-add-drop-table取消選項)(Defaults to on; use --skip-add-drop-table to disable.)
10、--add-locks Add locks around INSERT statements.(Defaults to on; use --skip-add-locks to disable.)
在每個表導(dǎo)出之前增加LOCK TABLES并且之后UNLOCK TABLE(為了使得更快地插入到MySQL)。默認(rèn)開啟。
11、--allow-keywords Allow creation of column names that are keywords.
允許創(chuàng)建是關(guān)鍵詞的列明子。這由表名前綴每個列名做到
12、 --apply-slave-statements Adds 'STOP SLAVE' prior to 'CHANGE MASTER' and 'START SLAVE' to bottom of dump
在CHANGE MASTER前添加STOP SLAVE,并且在導(dǎo)出的最后添加START SLAVE.
13、--character-sets-dir=name Directory for character set files.
字符集文件的目錄
14、-i, --comments Write additional information.
15、--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.
導(dǎo)出數(shù)據(jù)將和其他數(shù)據(jù)庫和舊版本的MySQL 相兼容.值可以為ansi、mysql323、mysql40、postgresql、oracle、mssql、db2、maxdb、no_key_opt、no_tables_options、no_field?
例子:
mysqldump -uroot -p --all-databases --compatible=ansi
16、 --compact Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --skip-add-locks --skip-comments --skip-disable-keys --skip-set-charset.
導(dǎo)出更少的輸出信息(用于調(diào)試)去掉注釋和頭尾等結(jié)構(gòu)。可以使用選項:
--skip-add-drop-table --skip-add-locks--skip-comments --skip-disable-key
例子:mysqldump -uroot -p --all-databases --compact
17、 -c, --complete-insert Use complete insert statements
使用完成的insert語句(包含列名稱),這么做能提高插入效率,但是可能會受到max_allowed_packer參數(shù)的影響而導(dǎo)致插入失敗?
例子:mysqldump -uroot -p --all-databases --complete-insert
18、 -C, --compress Use compression in server/client protocol.
在客戶端和服務(wù)器之間啟用壓縮傳遞所有信息?
例子:mysqldump -uroot -p --all-databases --compress
19、-a, --create-options Include all MySQL specific create options. (Defaults to on; use --skip-create-options to disable.)
在CREATE TABLE語句中包括所有MySQL特性選項。(默認(rèn)為打開狀態(tài))?
例子:mysqldump -uroot -p --add-databases
20、-B, --databases Dump several databases. Note the difference in usage; in this case no tables are given. All name arguments are regarded as database names. 'USE db_name;' will be included in the output.
導(dǎo)出數(shù)據(jù)里面添加創(chuàng)建數(shù)據(jù)庫的語句和切入數(shù)據(jù)庫
21、-#, --debug[=#] This is a non-debug version. Catch this and exit.
輸出debug信息,用于調(diào)試。默認(rèn)值為d:t:o,/tmp/mysqldump.trace?
例子:
mysqldump —uroot -p --add-databases --debugmysqldump -uroot -p --add-databases --debug="d:t:o,/tmp/debug.trace"
————-分割線————
22、--debug-check Check memory and open file usage at exit.
檢查內(nèi)存和打開文件使用說明并退出?
例子:mysqldump -uroot -p --add-databases --debug-check
23、--debug-info Print some debug info at exit.
輸出調(diào)試信息并推出?
例子:mysqldump -uroot -p --add-databases --debug-info
24、--default-character-set=name Set the default character set.
設(shè)置默認(rèn)字符集,默認(rèn)值為utf8?
mysqldump -uroot -p --add-databases --default-character-set=latin1
25、--delayed-insert Insert rows with INSERT DELAYED.例子:mysqldump -uroot -p --add-databases --delayed-insert
采用延時插入方式(INSERT DELAYED)導(dǎo)出數(shù)據(jù)
26、--delete-master-logs Delete logs on master after backup. This automatically enables --master-data.例子:mysqldump -uroot -p --add-databases --delete-master-logs
master備份后刪除日志,這個參數(shù)將自動激活--master-data
27、-K, --disable-keys '/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output. (Defaults to on; use --skip-disable-keys to disable.)例子:mysqldump -uroot -p --add-databases
對于每個表,用/*!40000 ALTER TABLE tbl_name DISABLE KEYS */;?
和/*!40000 ALTER TABLE tbl_name ENABLE KEYS */;語句引用INSERT?語句。這樣可以更快地導(dǎo)出dump出來的文件,因為它是在插入所有行后創(chuàng)建索引.該選項只適合MyISAM表,默認(rèn)為打開狀態(tài).
28、--dump-slave[=#] This causes the binary log position and filename of the master to be appended to the dumped data output. Setting the value to 1, will printit as a CHANGE MASTER command in the dumped data output; 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. ------------------例子:mysqldump -uroot -p --add-databases --dump-slave=1 mysqldump -uroot -p --all-databases --dump-slave=2
該選項導(dǎo)致主的binlog位置和文件名追加到導(dǎo)出數(shù)據(jù)的文件中。設(shè)置為1時,將會以CHANGE MASTER命令輸出到數(shù)據(jù)文件;?
設(shè)置為2時,在命令前增加說話信息。該選項將會打開--lock-all-tables,除非--single-transaction被指定。該選項會自動關(guān)閉–lock-tables選項。默認(rèn)值為0
29、-E, --events Dump events.例子:mysqldump -uroot -p --add-databases --events
導(dǎo)出事件
30、-e, --extended-insert Use multiple-row INSERT syntax that include several VALUES lists. (Defaults to on; use --skip-extended-insert to disable.)例子:mysqldump -uroot -p --all-databases mysqldump -uroot -p --all-databases --skip-extended-insert(取消選項)
使用具有多個VALUES列的INSERT語句.并加速導(dǎo)入時的速度。默認(rèn)為打開狀態(tài),使用--skip-extended-insert取消選項。
31、--fields-terminated-by=name Fields in the output file are terminated by the given string.例子:mysqldump -uroot -p test test --tab="/home/mysql" --fields-terminated-by="#"
導(dǎo)出文件中忽略給定字段。與--tab選項一起使用,不能用于--databases和--all-databases選項
32、--fields-enclosed-by=name Fields in the output file are enclosed by the given character.例子:mysqldump -uroot -p test test --tab="/home/mysql" --fields-enclosed-by="#"
輸出文件中的各個字段用給定字符包括。與--tab選項一起使用,不能用于--databases和--all-databases選項
33、--fields-optionally-enclosed-by=name Fields in the output file are optionally enclosed by the given character.例子:mysqldump -uroot -p test test --tab="/home/mysql"--fields-enclosed-by="#" --fields-optionally-enclosed-by ="#"
輸出文件中的各個字段用給定字符選項性包括。與--tab選項一起使用,不能用于--databases和--all-databases選項
34、--fields-escaped-by=name Fields in the output file are escaped by the given character.例子:mysqldump -uroot -p mysql user --tab="/home/mysql" --fields-escaped-by="#"
輸出文件中的各個字段忽略給定字符.與–tab選項一起使用,不能用于--databases和--all-databases選項
35、-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.例子:mysqldump -uroot -p --add-databases --flush-privileges
開始導(dǎo)出之前刷新日志?
請注意:加入一次導(dǎo)出多個數(shù)據(jù)庫(使用選項--databases或者--all-databases)將會逐個數(shù)據(jù)庫刷新日志.除使用--lock-all-tables或者--master-data外。在這種情況下,日志將會被刷新一次,相應(yīng)的所有表同時被鎖定。因此,如果打算同時導(dǎo)出和刷新日志應(yīng)該使用--lock-all-tables或者--master-data和--flush-logs
36、--flush-privileges Emit a FLUSH PRIVILEGES statement after dumping the mysql database. This option should be used any time the dump contains the mysql database and any other database that depends on the data in the mysql database for proper restore.例子:mysqldump -uroot -p --all-databases --flush-privilege
在導(dǎo)出mysql數(shù)據(jù)庫之后,發(fā)出一條FLUSH PRIVILEGES語句.為了正確恢復(fù),該選項應(yīng)該用于導(dǎo)出mysql數(shù)據(jù)庫和依賴mysql數(shù)據(jù)庫數(shù)據(jù)的任何時候。
37、-f, --force Continue even if we get an SQL error.例子:mysqldump -uroot -p --add-databases --force
在導(dǎo)出過程中忽略出現(xiàn)的SQL錯誤
38、-?, --help Display this help message and exit.例子:mysqldump --help
顯示幫助信息并退出
39、--hex-blob Dump binary strings (BINARY, VARBINARY, BLOB) in hexadecimal format.例子:mysqldump -uroot -p --all-databases --hex-blob
使用十六進(jìn)制格式導(dǎo)出二進(jìn)制字符串字段。如果有二進(jìn)制數(shù)據(jù)就必須使用該選項。影響到的字段類型有BINARY、VARBINARY、BLOB.
40、-h, --host=name Connect to host.例子:mysqldump -uroot -p host=localhost --all-databases
需要導(dǎo)出的主機信息
41、--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.例如: --ignore-table=database.table1 --ignore-table=database.table2.....例子:mysqldump -uroot -p --host=localhost --all-databases --ignore-tanle=mysql.user
不導(dǎo)出指定表,指定忽略多個表時,需要重復(fù)多次。每次一個表,每個表必須同時指定數(shù)據(jù)庫和表名
42、 --include-master-host-port Adds 'MASTER_HOST=<host>, MASTER_PORT=<port>' to 'CHANGE MASTER TO..' in dump produced with --dump-slave.
在--dump-slave產(chǎn)生的CHANGE MASTER TO ....語句中增加'MASTER_HOST=<host>,MASTER_PROT=<prot>'?
mysqldump -uroot -p –host=localhost –all-databases –include-master-host-port
43、--insert-ignore Insert rows with INSERT IGNORE.例子:mysqldump -uroot -p --host=localhost --all-databases --insert-ignore
在插入行使用INSERT IGNORE語句
44、--lines-terminated-by=name Lines in the output file are terminated by the given string.------例子:mysqldump -uroot -p --host=localhost test test --tab="/tmp/mysql" --lines-terminated-by="##"
輸出文件的每行用定字符串劃分.與--tab選項一起使用,不能用于--database和--all-databases選項。
45、-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.
提交請求鎖定所有數(shù)據(jù)庫中的所有表,以保證數(shù)據(jù)的一致性。這是一個全局讀鎖,并且自動關(guān)閉--single-transaction和--lock-tables選項
46、-l, --lock-tables Lock all tables for read. (Defaults to on; use --skip-lock-tables to disable.)-----------mysqldump -uroot -p --host=localhost --all-databases --lock-tables
開始導(dǎo)出前,多訂所有表。用READ LOCAL鎖定表以允許MyISAM表并行插入.對于支持事務(wù)的表例如InnoDB和BDB,--single-transaction是一個更好的選擇,因為它根本不需要鎖定表。?
請注意當(dāng)導(dǎo)出多個數(shù)據(jù)庫時,--lock-tables分別為每個數(shù)據(jù)庫鎖定表。因此,該選項不能保證導(dǎo)出文件的表在數(shù)據(jù)庫之間的邏輯一致性。不同數(shù)據(jù)庫表的導(dǎo)出狀態(tài)完全不同。
47、--log-error=name Append warnings and errors to given file.-------------例子:mysqldump -uroot -p --host=localhost --add-databases --log-error=/tmp/err_log
附加警告和錯誤信息到給定文件
48、--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.
該選項將binlog的位置和文件名追加到輸出文件中。如果為1,將會輸出CHANGE MASTER命令;如果為2,輸出的CHANGE MASTER命令前添加注釋信息。該選項打開--lock-all-tables?選項,除非--single-transaction也被鎖定。?
(在這種情況下,全局讀鎖在開始導(dǎo)出時獲得很短的時間;其他內(nèi)容參考下面的--single-transaction選項)。該選項自動關(guān)閉--lock-tables
例子:mysqldump -uroot -p --host=localhost --all-databases --master-data=1; mysqldump -uroot -p --host=localhost --all-databases --master-data=2;
——————分割線————–
49、--max-allowed-packet=# The maximum packet length to send to or receive from server.例子:mysqldump -uroot-p --host=localhost --all-database --max_allowed_packer=100240
服務(wù)器發(fā)送和接受的最大包長度。
50、--net-buffer-length=# The buffer size for TCP/IP and socket communication.例子:mysqldump -uroot -p --host=localhost --all-databases --net_buffer_length=10024
TCP/IP和socket連接的緩存大小
51、--no-autocommit Wrap tables with autocommit/commit statements.例子:mysqldump -uroot -p --host=localhost --all-databases --no-autocommit
使用autocommit/commit語句包裹表。
52、-n, --no-create-db Suppress the CREATE DATABASE ... IF EXISTS statement that normally is output for each dumped database if --all-databases or --databases is given.例子:mysqldump -uroot -p --host=localhost --all-databases --no-create-db
只導(dǎo)出數(shù)據(jù),而不添加CREATE DATABASE語句
53、-t, --no-create-info Don't write table creation info.例子:mysqldump -uroot -p --host=localhost --all-databases --no-create-info
只導(dǎo)出數(shù)據(jù),而不添加CREATE TABLE?語句
54、-d, --no-data No row information.例子:mysqldump -uroot -p --host=localhost --all-databases --no-data
只導(dǎo)出數(shù)據(jù),而不添加CREATE TABLE語句
55、-N, --no-set-names Same as --skip-set-charset.例子:mysqldump -uroot -p --host=localhost --all-databases --no-set-names
等同于--skip-set-charset
56、--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.--------例子:mysqldump -uroot -p --host=localhost --all-databases --opt
等同于--add-drop-table,--add-locks,--create-options,--quick,--extended-insert,--lock-tables,--set-charset,--disable-keys?該選項默認(rèn)開啟,可以用--skip-opt禁用
57、--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.例子:mysqldump -uroot -p --host=localhost --all-database --order-by-primary
如果存在主鍵,或者第一個唯一鍵,對每個表的記錄進(jìn)行排序。在導(dǎo)出MyISAM表到InnoDB表時有效,但會使得導(dǎo)出工作花費很長時間。
58、-p, --password[=name] Password to use when connecting to server. If password is not given it's solicited on the tty.
連接數(shù)據(jù)庫密碼
59、-P, --port=# Port number to use for connection.
連接數(shù)據(jù)庫端口號
60、--protocol=name The protocol to use for connection (tcp, socket, pipe, memory).例子:mysqldump -uroot -p --host=localhost --all-databases --protocol=tcp
使用的連接協(xié)議,包括:tcp、socker、pipe、memory
61、-q, --quick Don't buffer query, dump directly to stdout. (Defaults to on; use --skip-quick to disable.) ------例子:mysqldump -uroot -p --host=localhost --all-database mysqldump -uroot -p --host=localhost --all-database --skip-quick
不緩沖查詢,直接導(dǎo)出到標(biāo)準(zhǔn)輸出。默認(rèn)為打開狀態(tài),使用--skip-quick取消該選項。
62、-Q, --quote-names Quote table and column names with backticks (`). (Defaults to on; use --skip-quote-names to disable.)-------mysqldump -uroot -p --host=localhost --all-databasemysqldump -uroot -p --host=localhost --all-database --skip-quote-names
使用(`)引起表和列名。默認(rèn)為打開狀態(tài),使用--skip-quote-names取消該選項。
63、--replace Use REPLACE INTO instead of INSERT INTO.----------mysqldump -uroot -p --host=localhost --all-database --replace
使用REPLACE INTO?取代INSERT INTO.
64、-r, --result-file=name Direct output to a given file. This option should be used in systems (e.g., DOS, Windows) that use carriage-return linefeed pairs (\r\n) to separate text lines. This option ensures that only a single newline is used.----------------mysqldump -uroot -p --host=localhost --all-databases --result-file=/tmp/mysqldump_result_file.txt
直接輸出到指定文件中。該選項應(yīng)該用在使用回車換行對(\\r\\n)換行的系統(tǒng)上(例如:DOS,Windows)。該選項確保只有一行被使用
65、-R, --routines Dump stored routines (functions and procedures). ------mysqldump -uroot -p --host=localhost --all-databases --routines
導(dǎo)出存儲過程以及自定義函數(shù)。
66、--set-charset Add 'SET NAMES default_character_set' to the output. (Defaults to on; use --skip-set-charset to disable.)-----------------mysqldump -uroot -p --host=localhost --all-databasesmysqldump -uroot -p --host=localhost --all-database --skip-set-charset
添加'SET NAMES default_character_set'到輸出文件。默認(rèn)為打開狀態(tài),使用--skip-set-charset關(guān)閉選項。
67、--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. While a --single-transaction dump is in process, to ensure a valid dump file (correct table contents and binary log position), no other connection should use the following statements: ALTER TABLE, DROP TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not isolated from them. Option automatically turns off --lock-tables------------------mysqldump -uroot -p --host=localhost --all-database --single-transaction
改選項在導(dǎo)出數(shù)據(jù)之前提交一個BEGIN SQL語句,BEGIN不會阻塞任何應(yīng)用程序且能保證導(dǎo)出時的數(shù)據(jù)庫的一致性狀態(tài),他只使用與多版本存儲引擎,僅InnoDB?本選項和--lock-tables?選項是互相互斥的,因為LOCK TABLES?會使任何掛起的事務(wù)隱含提交。要想導(dǎo)出大表的話,應(yīng)結(jié)合使用--quick選項。
68、 --dump-date Put a dump date to the end of the output. (Defaults to on; use --skip-dump-date to disable.)例子:mysqldump -uroot -p --host=localhost --all-database mysqldump -uroot -p --host=localhost --all-databases --skip-dump-date
將導(dǎo)出時間添加到輸出文件中。默認(rèn)為打開狀態(tài),使用--skip-dump-data關(guān)閉選項
69、 --skip-opt Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.---------------mysqldump -uroot -p --host=localhost --all-databases --skip-opt
禁用-opt選項
70、-S, --socket=name The socket file to use for connection.---------mysqldump -uroot -p --host=localhost --all-databases --skip-opt
指定連接mysql的socket文件位置,默認(rèn)路徑/tmp/mysql.sock
71、 -T, --tab=name Create tab-separated textfile for each table to given path. (Create .sql and .txt files.) NOTE: This only works if mysqldump is run on the same machine as the mysqld server.mysqldump -uroot -p --host=localhost test test --tab="/home/mysql"
為每個表在給定路徑創(chuàng)建tab分隔的文本文件。注意:僅僅用于mysqldump和mysqld服務(wù)器運行在相同機器上,
72、--tables Overrides option --databases (-B).---------------mysqldump -uroot -p --host=localhost --database test --tables test
覆蓋--database?(-B)參數(shù),需要導(dǎo)出的表名。
73、--triggers Dump triggers for each dumped table. (Defaults to on; use --skip-triggers to disable.)----------------mysqldump -uroot -p --host=localhost --all-database --trigger
導(dǎo)出發(fā)出器。該選項默認(rèn)啟用,用--skip-trigger禁用它。
74、--tz-utc SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones. (Defaults to on; use --skip-tz-utc to disable.)--------------mysqldump -uroot -p --host=localhost --all-databases --tz-utc
在導(dǎo)出頂部設(shè)置時區(qū)TIME_ZONE='+00:00'?以保證不同時區(qū)導(dǎo)出的TIMESTAMP?數(shù)據(jù)或數(shù)據(jù)被移動其他時區(qū)時的正確性。
75、-u, --user=name User for login if not current user.
指定連接的用戶名
76、-v, --verbose Print info about the various stages.
輸出多種平臺信息
77、-V, --version Output version information and exit.
輸出mysqldump版本信息并退出
78、-w, --where=name Dump only selected records. Quotes are mandatory.-----------------mysqldump -uroot -p --host=localhost --all-databases --where="user='root'"
只轉(zhuǎn)儲給定的WHERE條件選擇的記錄。請注意如果條件包含命令解釋符專用空格或字符,一定要將條件引用起來
79、-X, --xml Dump a database as well formed XML.mysqldump -uroot -p --host=localhost --all-database --xml
導(dǎo)出XML格式
80、--plugin-dir=name Directory for client-side plugins.-------------------mysqldump -uroot -p --host=localhost --all-databases --plug_dir="/usr/local/lib/"
客戶端插件的目錄,用于兼容不同的插件版本
81、--default-auth=name Default authentication client-side plugin to use.---------------mysqldump -uroot -p --host=localhost --all-database --default-auth="/usr/local/lib/plugin/<PLUGIN>"
客戶端插件默認(rèn)使用
82、--enable-cleartext-plugin Enable/disable the clear text authentication plugin.
啟用/禁用 明文的身份驗證插件
總結(jié)
以上是生活随笔為你收集整理的Mysqldump命令参数介绍的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。