csx 3 years ago
parent
commit
400db248e4
2 changed files with 3 additions and 3 deletions
  1. 1 1
      main.go
  2. 2 2
      service/ms_db.go

+ 1 - 1
main.go View File

8
 
8
 
9
 func init() {
9
 func init() {
10
 	service.ConnectDB()
10
 	service.ConnectDB()
11
-	//service.ConnectMSDB()
11
+	service.ConnectMSDB()
12
 }
12
 }
13
 
13
 
14
 func main() {
14
 func main() {

+ 2 - 2
service/ms_db.go View File

30
 	dbName   = "local"
30
 	dbName   = "local"
31
 	user     = beego.AppConfig.DefaultString(dbName+"::user", "sa")
31
 	user     = beego.AppConfig.DefaultString(dbName+"::user", "sa")
32
 	password = beego.AppConfig.DefaultString(dbName+"::password", "hy123456")
32
 	password = beego.AppConfig.DefaultString(dbName+"::password", "hy123456")
33
-	host     = beego.AppConfig.DefaultString(dbName+"::host", "127.0.0.1")
33
+	host     = beego.AppConfig.DefaultString(dbName+"::host", "192.168.10.10")
34
 	port     = beego.AppConfig.DefaultInt(dbName+"::port", 1633)
34
 	port     = beego.AppConfig.DefaultInt(dbName+"::port", 1633)
35
-	dbname   = beego.AppConfig.DefaultString(dbName+"::dbname", "local")
35
+	dbname   = beego.AppConfig.DefaultString(dbName+"::dbname", "hyDB")
36
 )
36
 )
37
 
37
 
38
 func ConnectMSDB() {
38
 func ConnectMSDB() {