Whenmysqlbackup creates a backup, it sends SQL commands to a MySQL server using a database server connection. The way to create a connection is similar to what is described inConnecting to the MySQL Server Using Command Options of theMySQL 9.3 Reference Manual.
As part of themysqlbackup 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 throughmysqlbackup command-line options (click on the option name to see its description in themysql Client Options section of theMySQL 9.3 Reference Manual):
mysqlbackup reads only
--user,--password,--port, and--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.The
--hostoption 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-algorithmsare permitted by the server, connection to the server will not be established.
--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--password[=value] (short option:-p)--ssl-mode=mode--ssl-key=file_name--ssl-cert=file_name--ssl-ca=file_name--ssl-capath=directory_name--ssl-cipher=cipher_list--ssl-fips-mode={OFF|ON|STRICT}--tls-version=protocol_list--zstd-compression-level=number
Most other connection parameters used by themysql command are recognized, but silently ignored. Unknown connection parameters causemysqlbackup to throw an error and quit.