Bug #101992 Auto backup using mysqldump not working.
Submitted: 15 Dec 2020 4:42 Modified: 15 Dec 2020 14:02
Reporter: Kailasam Nagaraju Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:8.0.20 OS:Red Hat (7)
Assigned to: CPU Architecture:Any
Tags: mysqldump

[15 Dec 2020 4:42] Kailasam Nagaraju
Description:
After upgrading from 8.0.18 to 8.0.20 we had to manually set binary-as-hex to false in the /etc/my.cnf file for AES_Encryption and decryption as follows to function properly. Below is the addition that we did.

[client]
binary-as-hex = false

[mysql]
binary-as-hex = false

After doing the above, we now observe that our auto backups using mysqldump have started erroring out with the below error message. Sharing the script that we are using for our auto backups below:

mysqldump --defaults-extra-file=/root/.my.cnf -u ${MYSQL_USER} \
                                  ${DATABASE_NAME} | gzip > ${DB_BACKUP_PATH}/${TODAY}/${DATABASE_NAME}-${TODAY}.sql.gz

This functionality used to occur daily using mysqldump before the above change was made and was working as expected.

mysqldump: [ERROR] unknown variable 'binary-as-hex=false' 

How to repeat:
In mysql version 8.0.20 add the following in /etc/my.cnf file and restart mysqld service.

[client]
binary-as-hex = false

[mysql]
binary-as-hex = false

Configure auto back ups using mysqldump. Sharing sample script below:

mysqldump --defaults-extra-file=/root/.my.cnf -u ${MYSQL_USER} \
                                  ${DATABASE_NAME} | gzip > ${DB_BACKUP_PATH}/${TODAY}/${DATABASE_NAME}-${TODAY}.sql.gz
[15 Dec 2020 14:02] MySQL Verification Team
Hi Mr. Nagaraju,

Thank you for your bug report.

However, this is not a bug.

If you have read our Reference Manual and Release Notes, you would have noticed that this option is reserved for `mysql` client program only. Even then, it only works in interactive mode. On all other questions on this subject you will find answers in our documentation.

Not a bug.