fix: update db connect charset and collation
This commit is contained in:
1 parent
56cff767a6
commit
b46d4e23d2
12 files changed
+33
-33
No files matched your search
@@ -34,7 +34,7 @@ func loadDialect() map[string]dialectInfo {
|
||||
// 数据库类型对应的数据库连接
|
||||
switch item["type"] {
|
||||
case "mysql":
|
||||
dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=True&loc=Local",
|
||||
dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&loc=Local",
|
||||
item["username"],
|
||||
item["password"],
|
||||
item["host"],
|
||||
|
||||
Reference in new issue
Block a user