Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variable MYSQL_ROOT_PASSWORD is not used #23

Open
demitov opened this issue May 15, 2023 · 4 comments
Open

Environment variable MYSQL_ROOT_PASSWORD is not used #23

demitov opened this issue May 15, 2023 · 4 comments

Comments

@demitov
Copy link

demitov commented May 15, 2023

In README.md has an environment variable MYSQL_ROOT_PASSWORD, but scripts use MYSQL_ROOT_PASSW and MYSQL_ROOT_PASSWD

@Carazyda
Copy link
Member

Hello @demitov I don't quite understand you. The variable MYSQL_ROOT_PASSWORD is used in the communityserver and mysql server, and the variable MYSQL_ROOT_PASSWD in the mail server. Please indicate the exact lines of code that you mean.

@demitov
Copy link
Author

demitov commented May 16, 2023

Hello @Carazyda

Docker-MailServer git:(master) ✗ grep -rnw ./ -e 'MYSQL_ROOT_PASSWORD' 
.//README.md:93: -e MYSQL_ROOT_PASSWORD=my-secret-pw \
Docker-MailServer git:(master) ✗ grep -rnw ./ -e 'MYSQL_ROOT_PASSWD'  
.//iRedMail/config:14:export MYSQL_ROOT_PASSWD=${MYSQL_ROOT_PASSWD:-Isadmin123}
.//iRedMail/config:33:export MYSQL_ROOT_PASSWD=${MYSQL_SERVER_ENV_MYSQL_PASSWORD:-${MYSQL_ROOT_PASSWD}}
.//iRedMail/config:56:export VMAIL_DB_ADMIN_PASSWD="${MYSQL_ROOT_PASSWD}"
.//iRedMail/config:59:export AMAVISD_DB_PASSWD="${MYSQL_ROOT_PASSWD}"
.//iRedMail/config:62:export SPAMASSASSIN_DB_PASSWD="${MYSQL_ROOT_PASSWD}"
.//iRedMail/config:65:export CLUEBRINGER_DB_PASSWD="${MYSQL_ROOT_PASSWD}"
.//iRedMail/functions/mysql.sh:42:password=${MYSQL_ROOT_PASSWD}
.//iRedMail/functions/mysql.sh:56:UPDATE mysql.user SET Password=PASSWORD('${MYSQL_ROOT_PASSWD}') WHERE User='root';
.//iRedMail/functions/mysql.sh:94:            mysqladmin --user=root password "${MYSQL_ROOT_PASSWD}"
.//iRedMail/functions/mysql.sh:104:GRANT ALL PRIVILEGES ON *.* TO '${MYSQL_ROOT_USER}'@'${MYSQL_GRANT_HOST}' IDENTIFIED BY '${MYSQL_ROOT_PASSWD}';
.//iRedMail/functions/mysql.sh:105:GRANT ALL PRIVILEGES ON *.* TO '${MYSQL_ROOT_USER}'@'127.0.0.1' IDENTIFIED BY '${MYSQL_ROOT_PASSWD}';
.//iRedMail/functions/mysql.sh:110:UPDATE user SET Password = PASSWORD('${MYSQL_ROOT_PASSWD}') WHERE User = 'root';
.//iRedMail/functions/mysql.sh:135:    * Root user: ${MYSQL_ROOT_USER}, Password: ${MYSQL_ROOT_PASSWD}
.//iRedMail/functions/cleanup.sh:205:    export MYSQL_ROOT_PASSWD MYSQL_BACKUP_DATABASES
.//iRedMail/functions/cleanup.sh:208:    perl -pi -e 's#^(export MYSQL_PASSWD=).*#${1}"$ENV{MYSQL_ROOT_PASSWD}"#' ${BACKUP_SCRIPT_MYSQL}
.//README.md:103: -e MYSQL_ROOT_PASSWD=my-secret-pw \
.//README.md:206: -e MYSQL_ROOT_PASSWD=my-secret-pw \
Docker-MailServer git:(master) ✗ grep -rnw ./ -e 'MYSQL_ROOT_PASSW[},=]'
.//iRedMail/run_mailserver.sh:38:    while ! mysqladmin ping -h ${MYSQL_SERVER} -P ${MYSQL_SERVER_PORT} -u ${MYSQL_ROOT_USER} --password=${MYSQL_ROOT_PASSW} --silent; do
.//iRedMail/iRedMail.sh:87:    while ! mysqladmin ping -h ${MYSQL_SERVER} -P ${MYSQL_SERVER_PORT} -u ${MYSQL_ROOT_USER} --password=${MYSQL_ROOT_PASSW} --silent; do

@Carazyda
Copy link
Member

Yes, you are right about that. It's a typo. But it does not affect the operation of the mail server. Unfortunately we can't fix this right now. We plan to build a new version of the mail server, on modern components.

@demitov
Copy link
Author

demitov commented May 17, 2023

I solved the problem by simply adding two environment variables MYSQL_ROOT_PASSW and MYSQL_ROOT_PASSWD in deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants