mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-31 00:27:31 +08:00
Modify: use INT represent Database port
This commit is contained in:
@ -32,7 +32,7 @@ func Init() {
|
||||
// 未指定数据库时,使用SQLite
|
||||
db, err = gorm.Open("sqlite3", util.RelativePath(conf.DatabaseConfig.DBFile))
|
||||
} else {
|
||||
db, err = gorm.Open(conf.DatabaseConfig.Type, fmt.Sprintf("%s:%s@(%s:%s)/%s?charset=utf8&parseTime=True&loc=Local",
|
||||
db, err = gorm.Open(conf.DatabaseConfig.Type, fmt.Sprintf("%s:%s@(%s:%d)/%s?charset=utf8&parseTime=True&loc=Local",
|
||||
conf.DatabaseConfig.User,
|
||||
conf.DatabaseConfig.Password,
|
||||
conf.DatabaseConfig.Host,
|
||||
|
||||
Reference in New Issue
Block a user