From 56f8e16463b79e41feffef4785494c274bf92dff Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 16 Jun 2023 12:28:14 +0800 Subject: [PATCH] fix --- initalize/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initalize/mysql.go b/initalize/mysql.go index 03eb2ccb..4ffc7ce5 100644 --- a/initalize/mysql.go +++ b/initalize/mysql.go @@ -10,7 +10,7 @@ import ( // SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest // 初始化mysql func InitMysql(sourceMysql string) *gorm.DB { - dsn := sourceMysql + "?" + "charset=utf8mb4&parseTime=true" + dsn := sourceMysql + "?charset=utf8mb4&parseTime=true" db, err := gorm.Open(mysql.New(mysql.Config{ DSN: dsn, // DSN data source name DefaultStringSize: 255, // string 类型字段的默认长度