DBAssembler: Fix incorrect apply sql files at import (#1252)

This commit is contained in:
Kargatum
2019-01-12 16:53:49 +07:00
committed by Viste(Кирилл)
parent b16bb23ef7
commit 8e7fb1a38a

View File

@@ -299,7 +299,7 @@ function dbasm_db_import() {
export MYSQL_PWD=$MYSQL_PASS
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" --default-character-set=utf8 "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql"
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" "$dbname" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then