Hi!
May be necroposting..., but just installed IredMail 1.6.5 and get same error.
And command:
mysql -uroot -p"password" -e 'show databases'
work correct. But command:
/bin/bash /var/vmail/backup/backup_mysql.sh
anywhere print error:
[ERROR] MySQL username or password is incorrect in file /var/vmail/backup/backup_mysql.sh.+ echo 'Please fix them first.'Please fix them first.+ exit 255
...and in file /var/vmail/backup/backup_mysql.sh i am found this ''wrong???" variable declaration:
export CMD_MYSQL="mysql --defaults-file=${MYSQL_DOT_MY_CNF} -u${MYSQL_ROOT_USER}"
hm... - CMD_MYSQL not contain password...
1) I am add one more declaration:
export MYSQL_ROOT_PASS="verysuperstrongpass"
2) Correct "wrong???" declarations:
a) export CMD_MYSQL="mysql --defaults-file=${MYSQL_DOT_MY_CNF} -u${MYSQL_ROOT_USER} -p${MYSQL_ROOT_PASS}"
b) export CMD_MYSQLDUMP="mysqldump --defaults-file=${MYSQL_DOT_MY_CNF} -u${MYSQL_ROOT_USER} -p${MYSQL_ROOT_PASS} --events --ignore-table=mysql.event --default-character-set=${DB_CHARACTER_SET} --skip-comments"
After this script "/var/vmail/backup/backup_mysql.sh" do backup:
==> Backup completed successfully.
==> Detailed log (/var/vmail/backup/mysql/2023/10/26/2023-10-26-20-05-38.log):
=========================
* Starting backup: 2023-10-26-20-05-38.
* Backup directory: /var/vmail/backup/mysql/2023/10/26.
* Backing up databases: mysql vmail roundcubemail amavisd iredadmin sogo iredapd sa_bayes.
* File size:
----
884K amavisd-2023-10-26-20-05-38.sql.bz
24,0K iredadmin-2023-10-26-20-05-38.sql.bz
216K iredapd-2023-10-26-20-05-38.sql.bz
2336K mysql-2023-10-26-20-05-38.sql.bz
216K sogo-2023-10-26-20-05-38.sql.bz
28,0K vmail-2023-10-26-20-05-38.sql.bz2
----
* Backup completed (Success? YES).