fix: gorm的mysql连接
This commit is contained in:
1 parent
a7f3fb77d8
commit
7c796b1275
1 file changed
+1
-1
@@ -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&collation=utf8mb4_general_ci&parseTime=True&loc=Local",
|
||||
dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=True&loc=Local",
|
||||
item["username"],
|
||||
item["password"],
|
||||
item["host"],
|
||||
|
||||
Reference in new issue
Block a user