improve db error message, export db passwort correct

This commit is contained in:
einhornimmond 2025-12-05 13:33:51 +01:00
parent dbad91015d
commit 87cb1473dd
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ const run = async (command: string) => {
host: ${CONFIG.DB_HOST}
port: ${CONFIG.DB_PORT}
user: ${CONFIG.DB_USER}
password: ${CONFIG.DB_PASSWORD.slice(-2)}
password: last 2 character: ${CONFIG.DB_PASSWORD.slice(-2)}
database: ${CONFIG.DB_DATABASE}`,
)
}

View File

@ -249,6 +249,8 @@ if [ -z "${DB_PASSWORD}" ]; then
echo "Error: Failed to generate DB_PASSWORD."
exit 1
fi
export DB_PASSWORD
mysql <<EOFMYSQL
CREATE USER IF NOT EXISTS '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost';