Fix encoding issues when exporting database

This commit is contained in:
Milan Vit
2020-01-29 10:27:39 +09:00
parent 489b7db1a6
commit 6e448e9f02

View File

@@ -100,7 +100,7 @@ service_export() {
local PASSWORD="$(service_password "$SERVICE")"
[[ -n $SSH_TTY ]] && stty -opost
docker exec "$SERVICE_NAME" bash -c "printf '[client]\npassword=$PASSWORD\n' > /root/credentials.cnf"
docker exec "$SERVICE_NAME" bash -c "printf '[client]\ndefault-character-set=utf8mb4\npassword=$PASSWORD\n' > /root/credentials.cnf"
docker exec "$SERVICE_NAME" mysqldump --defaults-extra-file=/root/credentials.cnf --user=mysql "$DATABASE_NAME"
docker exec "$SERVICE_NAME" rm /root/credentials.cnf
status=$?