MySQL Connection Information

If you are using specific connection options such as:

  • TCP connection

  • Non-standard port

  • Password

  • and others,

it is possible to create a configuration file to store these settings and use them with the Bacula Enterprise Plugin. For example, it avoids having the password exposed on the Plugin command string.

The connection file should be specified with the extra_file plugin command line option. In the connection file, the [client] section is a shortcut for all required context.

Note

The the extra_file plugin option was introduced in Bacula Enterprise 8.2.4 and available with MySQL 5.0.6.

# cat /opt/bacula/etc/database1.cnf
[client]
user=admin
password=admin1
socket=/tmp/mysql.sock

# Plugin = "mysql: extra_file=/opt/bacula/etc/database1.cnf"

In bin backup mode, the xtrabackup tool doesn’t read the .my.cnf to get connection information. To use the binary backup mode, it is mandatory to specify the password on the Plugin command line or to use the extra_file plugin command option.

It is also possible to use the user specific .my.cnf MySQL ini file that should contain information for client programs such as mysql, mysqldump.

# comment
[client]
password=rootroot

MySQL programs will search the .my.cnf file in the HOME directory by default. With the Bacula Enterprise MySQL Plugin, the .my.cnf file can be stored anywhere on your system. The use of the mycnf_dir FileSet option permits to specify the directory where this file is stored.

# cat /opt/bacula/etc/.my.cnf
[client]
user=admin
password=admin1

# Plugin = "mysql: mycnf_dir=/opt/bacula/etc"

Go back to the Configuration page.

Go back to the main MySQL Plugin page.

Go back to the Dedicated Backup Solutions page.