123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /*
- * @description: mysql配置信息
- * @Author: CP
- * @Date: 2020-08-20 22:25:13
- * @FilePath: \construction_management\conf\db.go
- */
- package conf
- const DriverName = "mysql"
- type DbConfig struct {
- Host string `mapstructure:"host" json:"host"`
- Port int `mapstructure:"port" json:"port"`
- User string `mapstructure:"user" json:"user"`
- Pwd string `mapstructure:"pwd" json:"pwd"`
- Datebase string `mapstructure:"datebase" json:"datebase"`
- IsRunning bool
- }
- var MysqlConfig DbConfig
- var DbMasterList = []DbConfig{
- // 单体数据库222
- {
- Host: "192.168.1.170",
- Port: 30000,
- User: "root",
- Pwd: "root",
- Datebase: "construction",
- IsRunning: true,
- },
- // 集群数据库
- {
- Host: "192.168.1.26",
- Port: 8066,
- User: "root",
- Pwd: "123456",
- Datebase: "construction",
- IsRunning: true,
- },
- // QA
- {
- Host: "192.168.1.76",
- Port: 3306,
- User: "zh_dev",
- Pwd: "zongheng2019",
- Datebase: "construction",
- IsRunning: true,
- },
- {
- Host: "8.135.240.149",
- Port: 3306,
- User: "zongheng",
- Pwd: "@)!(smartcost#*%)",
- Datebase: "construction",
- IsRunning: true,
- },
- }
- var DbMaster = DbMasterList[3]
|