|
|
|
@ -44,7 +44,7 @@ func initMysqlDB() {
|
|
|
|
|
db.Close()
|
|
|
|
|
|
|
|
|
|
dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
|
|
|
|
|
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName+"test1")
|
|
|
|
|
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName)
|
|
|
|
|
db, err = gorm.Open("mysql", dsn)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.NewError("0", "Open failed ", err.Error(), dsn)
|
|
|
|
|