mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
fix: escape MySQL backtick quotes in prepare-db.sh (double-backslash -> single)
Former-commit-id: 0ffd939b7bc3ddeb9810bbdd31fb2768189d2309
This commit is contained in:
Regular → Executable
+1
-1
@@ -40,7 +40,7 @@ for db_name in "${!DB_MAP[@]}"; do
|
|||||||
log_info "Restoring $db_name from $backup_file ($(du -h "$backup_path" | cut -f1))..."
|
log_info "Restoring $db_name from $backup_file ($(du -h "$backup_path" | cut -f1))..."
|
||||||
|
|
||||||
# Create DB if not exists
|
# Create DB if not exists
|
||||||
$MYSQL_CMD -e "CREATE DATABASE IF NOT EXISTS \\`$db_name\\` DEFAULT CHARACTER SET utf8mb4;"
|
$MYSQL_CMD -e "CREATE DATABASE IF NOT EXISTS \`$db_name\` DEFAULT CHARACTER SET utf8mb4;"
|
||||||
|
|
||||||
# Import
|
# Import
|
||||||
zcat "$backup_path" | $MYSQL_CMD "$db_name" 2>&1 | tail -1
|
zcat "$backup_path" | $MYSQL_CMD "$db_name" 2>&1 | tail -1
|
||||||
|
|||||||
Reference in New Issue
Block a user