-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
If there is another configuration, for example ~/.my.cnf, those values take precedence over the ones supplied with --defaults-extra-file if the user is not the same in .my.cnf to the configured one, the command fails with authentication error.
The behaviour is described in https://dev.mysql.com/doc/refman/8.0/en/option-file-options.html#option_general_defaults-extra-file
The problem goes away if instead of using --defaults-extra-file, the argument is changed to --defaults-file, because in this case the other configuration files don't take precedence over the supplied values.
In backup-manager/backup-methods.sh
base_command="$mysqldump --defaults-file=$mysql_conffile $opt -u$BM_MYSQL_ADMINLOGIN -h$BM_MYSQL_HOST -P$BM_MYSQL_PORT $BM_MYSQL_EXTRA_OPTIONS"
...
DBNAMES=$($mysql --defaults-file=$mysql_conffile -u $BM_MYSQL_ADMINLOGIN -h $BM_MYSQL_HOST -P $BM_MYSQL_PORT -B -N -e "show databases" | sed 's/ /%/g')
Metadata
Metadata
Assignees
Labels
No labels