20.2 Connection Options

When mysqlbackup creates a backup, it sends SQL commands to a MySQL server using a database connection. The way to create a connection is similar to what is described in Connecting to the MySQL Server Using Command Options of the MySQL 8.0 Reference Manual.

As part of the mysqlbackup invocation, specify the appropriate --user, --password, --port, and other options to connect to the MySQL server. You can specify the connection-specific MySQL client options listed below in the [mysqlbackup] or [client] sections of a MySQL configuration file, or through mysqlbackup command-line options (click on the option name to see its description in the mysql Client Options section of the MySQL 8.0 Reference Manual):

  • mysqlbackup reads only --user, --password, --port, and --socket options from the [client] group, and ignores any other connection options.

  • If you do not provide a value for the --password, the command prompts for one from the keyboard.

  • The --host option is allowed in the configuration file for compatibility, but it has no effect. mysqlbackup always connects to the local server's IP address.

  • If none of the algorithms specified by --compression-algorithms are permitted by the server, connection to the server will not be established.

Most other connection parameters used by the mysql command are recognized, but silently ignored. Unknown connection parameters cause mysqlbackup to throw an error and quit.