On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server.

–compress, -C

Compress all information sent between the client and the server if both support compression.


A hint about the client-side authentication plugin to use. See Section 6.3.9, “Pluggable Authentication”.


Enable the mysql_clear_password cleartext authentication plugin. (See Section, “Client-Side Cleartext Pluggable Authentication”.)

This option was added in MySQL 5.7.10.

–host=host_name, -h host_name

Dump data from the MySQL server on the given host. The default host is localhost.

指定要使用的已命名的.mylogin.cnf文件中的「登录路径(login path)」

「登录路径(login path)」,是一个选项组,该选项组中保存了连接到MySQL服务器的登录认证信息。

如果要创建或者修改「登录路径(login path)」文件,使用mysql_config_editor命令。

–password[=password], -p[password]

The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the –password or -p option on the command line, mysqldump prompts for one.

Specifying a password on the command line should be considered insecure. See Section, “End-User Guidelines for Password Security”. You can use an option file to avoid giving the password on the command line.

–pipe, -W

On Windows, connect to the server using a named pipe. This option applies only if the server supports named-pipe connections.


The directory in which to look for plugins. Specify this option if the –default-auth option is used to specify an authentication plugin but mysqldump does not find it. See Section 6.3.9, “Pluggable Authentication”.

–port=port_num, -P port_num

The TCP/IP port number to use for the connection.


The connection protocol to use for connecting to the server. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want. For details on the permissible values, see Section 4.2.2, “Connecting to the MySQL Server”.


Do not send passwords to the server in old (pre-4.1) format. This prevents connections except for servers that use the newer password format. This option was added in MySQL 5.7.4.

As of MySQL 5.7.5, this option is deprecated and will be removed in a future MySQL release. It is always enabled and attempting to disable it (–skip-secure-auth, –secure-auth=0) produces an error. Before MySQL 5.7.5, this option is enabled by default but can be disabled.


Passwords that use the pre-4.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided. Pre-4.1 passwords are deprecated and support for them was removed in MySQL 5.7.5. For account upgrade instructions, see Section, “Migrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin”.

–socket=path, -S path

For connections to localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use.


Options that begin with –ssl specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates. See Section 6.4.2, “Command Options for Encrypted Connections”.


The protocols permitted by the client for encrypted connections. The value is a comma-separated list containing one or more protocol names. The protocols that can be named for this option depend on the SSL library used to compile MySQL. For details, see Section 6.4.6, “Encrypted Connection Protocols and Ciphers”.

This option was added in MySQL 5.7.10.

–user=user_name, -u user_name

The MySQL user name to use when connecting to the server.

You can also set the following variables by using –var_name=value syntax:


The maximum size of the buffer for client/server communication. The default is 24MB, the maximum is 1GB.


The initial size of the buffer for client/server communication. When creating multiple-row INSERT statements (as with the –extended-insert or –opt option), mysqldump creates rows up to net_buffer_length bytes long. If you increase this variable, ensure that the MySQL server net_buffer_length system variable has a value at least this large.