File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ load_default_config() {
8484 CONFIG_mysql_dump_dbstatus=' yes'
8585 CONFIG_mysql_dump_differential=' no'
8686 CONFIG_mysql_dump_login_path=' automysqldump'
87+ CONFIG_mysql_dump_login_path_file=' '
8788 CONFIG_mysql_dump_encrypted_login=' no'
8889 CONFIG_backup_local_files=()
8990 CONFIG_db_names=()
@@ -106,6 +107,9 @@ mysql_commands() {
106107 export MYSQLDUMP=" mysqldump --login-path=$CONFIG_mysql_dump_login_path "
107108 export MYSQLSHOW=" mysqlshow --login-path=$CONFIG_mysql_dump_login_path "
108109 export MYSQL=" mysql --login-path=$CONFIG_mysql_dump_login_path "
110+ if [ -n " ${CONFIG_mysql_dump_login_path_file} " ]; then
111+ export MYSQL_TEST_LOGIN_FILE=$CONFIG_mysql_dump_login_path_file
112+ fi
109113 else
110114 export MYSQLDUMP=" mysqldump --user=${CONFIG_mysql_dump_username} --password=${CONFIG_mysql_dump_password} --host=${CONFIG_mysql_dump_host} " ;
111115 export MYSQLSHOW=" mysqlshow --user=${CONFIG_mysql_dump_username} --password=${CONFIG_mysql_dump_password} --host=${CONFIG_mysql_dump_host} " ;
Original file line number Diff line number Diff line change 2525# automysqldump is using the login-path "automysqldump" as default
2626#CONFIG_mysql_dump_login_path='automysqldump'
2727
28+ # Path to the mysql login configuration file.
29+ # Sometimes if the script is running in a cronjob, the mysql login configuration file cannot be located.
30+ # I.e. set it to '/root/.mylogin.cnf' or '/home/username/.mylogin.cnf'
31+ #CONFIG_mysql_dump_login_path_file=''
32+
2833# Username to access the MySQL server e.g. dbuser
2934#CONFIG_mysql_dump_username='root'
3035
You can’t perform that action at this time.
0 commit comments