From 0e1e398ced1ef75d03d829838b4cbe81b005fde6 Mon Sep 17 00:00:00 2001 From: liugang Date: Mon, 24 Nov 2025 14:04:44 +0800 Subject: [PATCH] * [misc] Add the keyword DEFAULT when installing MySQL or MariaDB. --- lib/dbh/dbh.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dbh/dbh.class.php b/lib/dbh/dbh.class.php index aa359a1ca7..0bd294e684 100644 --- a/lib/dbh/dbh.class.php +++ b/lib/dbh/dbh.class.php @@ -478,7 +478,7 @@ class dbh { case 'mysql': $result = $this->getServerCharsetAndCollation(); - $sql = "CREATE DATABASE `{$this->dbConfig->name}` CHARACTER SET {$result['charset']} COLLATE {$result['collation']}"; + $sql = "CREATE DATABASE `{$this->dbConfig->name}` DEFAULT CHARACTER SET {$result['charset']} COLLATE {$result['collation']}"; return $this->rawQuery($sql); case 'dm': $createSchema = "CREATE SCHEMA {$this->dbConfig->name} AUTHORIZATION {$this->dbConfig->user}";