From d01820c125669367b7a585d767d5f11e73a701c2 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Sat, 29 Mar 2014 13:40:22 +0800 Subject: conf support mysql port --- models/models.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/models.go b/models/models.go index 04a361c595..bafa1747e8 100644 --- a/models/models.go +++ b/models/models.go @@ -38,7 +38,7 @@ func SetEngine() { var err error switch DbCfg.Type { case "mysql": - orm, err = xorm.NewEngine("mysql", fmt.Sprintf("%s:%s@%s/%s?charset=utf8", + orm, err = xorm.NewEngine("mysql", fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8", DbCfg.User, DbCfg.Pwd, DbCfg.Host, DbCfg.Name)) case "postgres": orm, err = xorm.NewEngine("postgres", fmt.Sprintf("user=%s password=%s dbname=%s sslmode=%s", -- cgit v1.2.3