From 38a5136e692d572eb6be42bec59350019689af7a Mon Sep 17 00:00:00 2001 From: zebra Date: Tue, 8 Feb 2022 10:18:47 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E7=AC=A6=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/common/script/initdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/common/script/initdb.py b/applications/common/script/initdb.py index 84399ff..27358e3 100644 --- a/applications/common/script/initdb.py +++ b/applications/common/script/initdb.py @@ -22,7 +22,7 @@ def is_exist_database(): def init_database(): db = pymysql.connect(host=HOST, port=int(PORT), user=USERNAME, password=PASSWORD, charset='utf8mb4') cursor1 = db.cursor() - sql = "CREATE DATABASE IF NOT EXISTS %s" % DATABASE + sql = "CREATE DATABASE IF NOT EXISTS %s CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;" % DATABASE res = cursor1.execute(sql) db.close() return res -- Gitee