csx 3 anos atrás
pai
commit
cbdeb7fa44
2 arquivos alterados com 7 adições e 1 exclusões
  1. 1 1
      conf/app.conf
  2. 6 0
      service/db.go

+ 1 - 1
conf/app.conf Ver arquivo

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

+ 6 - 0
service/db.go Ver arquivo

@@ -94,6 +94,12 @@ func ConnectDB() {
94 94
 	blPass := beego.AppConfig.String("blmysqlpass")
95 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 103
 	rdsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", readUser, readPass, readHost, readPort, readName)
98 104
 	wdsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", writeUser, writePass, writeHost, writePort, writeName)
99 105