fix
This commit is contained in:
@@ -5,7 +5,7 @@ db_user="${DB_USER:-sylvania}"
|
||||
db_password="${DB_PASSWORD:-sylvania}"
|
||||
|
||||
# Identifiers are deliberately fixed; only the application login is configurable.
|
||||
mariadb --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" <<SQL
|
||||
mariadb --default-character-set=utf8mb4 --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" <<SQL
|
||||
CREATE DATABASE IF NOT EXISTS auth CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
CREATE DATABASE IF NOT EXISTS characters CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
CREATE DATABASE IF NOT EXISTS world CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
@@ -20,21 +20,21 @@ GRANT ALL PRIVILEGES ON shop.* TO '${db_user}'@'%';
|
||||
FLUSH PRIVILEGES;
|
||||
SQL
|
||||
|
||||
mariadb --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" auth < /sylvania/base/auth_database.sql
|
||||
mariadb --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" characters < /sylvania/base/characters_database.sql
|
||||
mariadb --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" shop < /sylvania/base/shop_database.sql
|
||||
mariadb --default-character-set=utf8mb4 --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" auth < /sylvania/base/auth_database.sql
|
||||
mariadb --default-character-set=utf8mb4 --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" characters < /sylvania/base/characters_database.sql
|
||||
mariadb --default-character-set=utf8mb4 --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" shop < /sylvania/base/shop_database.sql
|
||||
|
||||
shopt -s nullglob
|
||||
for dump in /sylvania/dumps/*.sql /sylvania/dumps/*.sql.gz; do
|
||||
echo "Importing game database dump: ${dump}"
|
||||
if [[ "${dump}" == *.gz ]]; then
|
||||
gzip -dc "${dump}" | mariadb --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}"
|
||||
gzip -dc "${dump}" | mariadb --default-character-set=utf8mb4 --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}"
|
||||
else
|
||||
mariadb --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" < "${dump}"
|
||||
mariadb --default-character-set=utf8mb4 --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" < "${dump}"
|
||||
fi
|
||||
done
|
||||
|
||||
# The published 7.3.5 dump uses a lowercase name, while the core queries this
|
||||
# one legacy table with its historical mixed-case identifier on Linux.
|
||||
mariadb --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" \
|
||||
mariadb --default-character-set=utf8mb4 --protocol=socket -uroot -p"${MARIADB_ROOT_PASSWORD}" \
|
||||
-e 'RENAME TABLE hotfixes.questv2clitask TO hotfixes.QuestV2CliTask;'
|
||||
|
||||
@@ -40,7 +40,7 @@ sed -i -E \
|
||||
|
||||
# Keep the client-facing realm record in sync after restores and migrations.
|
||||
# Values are validated above before being interpolated into SQL.
|
||||
mariadb --protocol=tcp \
|
||||
mariadb --default-character-set=utf8mb4 --protocol=tcp \
|
||||
-h "${db_host}" -P "${db_port}" -u "${db_user}" "-p${db_password}" auth <<SQL
|
||||
INSERT INTO realmlist
|
||||
(id, name, address, localAddress, localSubnetMask, port, icon, flag,
|
||||
|
||||
Reference in New Issue
Block a user