diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-29 13:40:22 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-29 13:40:22 +0800 |
commit | d01820c125669367b7a585d767d5f11e73a701c2 (patch) | |
tree | d16250253e4528374233f754d40c6b5cf429ae8c /models/models.go | |
parent | 6e376bb85c7a154c7567fd4be8cabc9627c8c6e7 (diff) | |
download | gitea-d01820c125669367b7a585d767d5f11e73a701c2.tar.gz gitea-d01820c125669367b7a585d767d5f11e73a701c2.zip |
conf support mysql port
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 2 |
1 files changed, 1 insertions, 1 deletions
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", |