For MySQL Enterprise Backup 8.0.22 and later:LDAP pluggable authentication is a feature supported by the MySQL Enterprise Edition; the user by whichmysqlbackup connects to the server can be authenticated using LDAP. Beyond proper setup for LDAP on the server side, the following requirements apply for LDAP authentication to work withmysqlbackup:
If the user is using simple LDAP authentication, the password is communicated to the server in cleartext; enableClient-Side Cleartext Pluggable Authentication by using the
--enable-cleartext-pluginoption in yourmysqlbackup command, or set the environment variableLIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=[1|Y|y]in the environment you run the command.If the user is using SASL-based LDAP authentication and the client-side plugin (
authentication_ldap_sasl_client) is not located in the server's plugin folder, the--plugin-diroption should be used with themysqlbackup command to specify the location of the plugin, or the same information should be provided by setting the environment variableLIBMYSQL_PLUGIN_DIRin the environment you run the command.
The following are some sample commands for using LDAP authentication:
Example 16.1 Backup Using Simple LDAP Authentication
mysqlbackup --user=mysqlbackup --password=password --host=127.0.0.1 \ --backup-dir=/home/mysqlbackup/backup-tmp --backup-image=/home/mysqlbackup/backups/my.mbi \ --enable-cleartext-plugin backup-to-imageExample 16.2 TTS Restore Using Simple LDAP Authentication
mysqlbackup --user=mysqlbackup --password=password --host=127.0.0.1 \ --backup-dir=/home/mysqlbackup/backup-tmp --backup-image=/home/mysqlbackup/backups/my.mbi \--include-tables=REGEX --enable-cleartext-plugin copy-back-and-apply-logExample 16.3 Backup Using SALS-based LDAP Authentication
mysqlbackup --user=mysqlbackup --password=password --host=127.0.0.1 \ --backup-dir=/home/mysqlbackup/backup-tmp --backup-image=/home/mysqlbackup/backups/my.mbi \ --plugin-dir=SASL_plugin-dir backup-to-imageExample 16.4 TTS Restore Using SALS-based Authentication
mysqlbackup --user=mysqlbackup --password=password --host=127.0.0.1 \ --backup-dir=/home/mysqlbackup/backup-tmp --backup-image=/home/mysqlbackup/backups/my.mbi \--include-tables=REGEX --plugin-dir=SASL_plugin-dir copy-back-and-apply-log