When mysqlbackup creates a backup, it sends SQL commands to MySQL server using a database connection. The general connection details are the same as described in Connecting to the MySQL Server Using Command Options in the MySQL Reference Manual.
As part of the mysqlbackup invocation,
specify the appropriate
--socket options that are necessary to connect
to the MySQL server.
You can specify the following connection-specific options in the
sections of a MySQL configuration file, or through
mysqlbackup command-line options.
mysqlbackup reads your default configuration
files and then the
my.cnf file specified on
the command line.
mysqlbackup reads only
--socketoptions 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.
--hostoption is allowed in the configuration file for compatibility, but currently it has no effect. The mysqlbackup command always connects to the local server's IP address.
Options Common to mysqld ======================== --login-path=name --port=port-num --protocol=tcp|socket|pipe|memory --pipe [ alias for --protocol=pipe ] --user=name [ short option: -u ] --host=hostname --socket=name --shared-memory-base-name=value [Windows only] --character-sets-dir=PATH --default-character-set=VALUE --secure-auth [ Don't connect to pre-4.1.1 server ] --password[=value] [ short option: -p ] --connect-timeout --ssl [ Enable SSL for connection ] --ssl-key=file_name --ssl-cert=file_name --ssl-ca=file_name --ssl-capath=directory_name --ssl-cipher=cipher_list --ssl-verify-server-cert Connection Options Specific to mysqlbackup ========================================== --no-connection --connect-if-online
Most other connection parameters used by the mysql command are recognized, but silently ignored. Unknown connection parameters cause the mysqlbackup command to stop.
The following connections options are specific to mysqlbackup:
--no-connectionoption supersedes the other connection options and uses file-level operations to perform the backup. When you use this option, you must specify in the configuration file or on the command line many options whose values are normally retrieved automatically through the database connection.Warning
This option also turns on the
--no-lockingoptions, which might result in inconsistencies in non-InnoDB data if the tables are modified during the backup operation. It might also affect subsequent incremental backups; see the description for the
--incremental-baseoption for details.
By default, a database connection is used for backup operations both during the initial stage to retrieve source repository configuration, and to lock tables while copying non-InnoDB data. This option allows mysqlbackup to make connection attempts in both phases, but continues even if the connection cannot be established. If a connection cannot be established, the processing is the same as with the
--no-connectionoption. This option can be useful in emergency situations: for example, when the database server goes down during the backup operation.