csx 3 years ago
parent
commit
cbdeb7fa44
2 changed files with 7 additions and 1 deletions
  1. 1 1
      conf/app.conf
  2. 6 0
      service/db.go

+ 1 - 1
conf/app.conf View File

30
 sso_domain = https://sso.kuyicloud.com
30
 sso_domain = https://sso.kuyicloud.com
31
 front_end_domain = "https://xt.kuyicloud.com/#"
31
 front_end_domain = "https://xt.kuyicloud.com/#"
32
 
32
 
33
-blmysqlhost = localhost
33
+blmysqlhost = 192.168.10.10
34
 blmysqlport = 3306
34
 blmysqlport = 3306
35
 blmysqluser = root
35
 blmysqluser = root
36
 blmysqlpass = 12345678
36
 blmysqlpass = 12345678

+ 6 - 0
service/db.go View File

94
 	blPass := beego.AppConfig.String("blmysqlpass")
94
 	blPass := beego.AppConfig.String("blmysqlpass")
95
 	blName := beego.AppConfig.String("blmysqlname")
95
 	blName := beego.AppConfig.String("blmysqlname")
96
 
96
 
97
+	fmt.Println(blHost)
98
+	fmt.Println(blPort)
99
+	fmt.Println(blUser)
100
+	fmt.Println(blPass)
101
+	fmt.Println(blName)
102
+
97
 	rdsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", readUser, readPass, readHost, readPort, readName)
103
 	rdsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", readUser, readPass, readHost, readPort, readName)
98
 	wdsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", writeUser, writePass, writeHost, writePort, writeName)
104
 	wdsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", writeUser, writePass, writeHost, writePort, writeName)
99
 
105