|
|
|
@ -34,7 +34,7 @@ func SetupMysql() {
|
|
|
|
|
//rm-uf6qb1jym26a044z03o.mysql.rds.aliyuncs.com
|
|
|
|
|
//rm-uf6qb1jym26a044z0.mysql.rds.aliyuncs.com内网
|
|
|
|
|
c = &MysqlConfig{
|
|
|
|
|
Dsn: "db_recook_super:sduEb9MTSiqhweXGpxa0@123@tcp(127.0.0.1:3306)/db_recook?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
|
|
|
|
|
Dsn: "db_recook_v2:H6568h4Y7BDsWcYe@tcp(127.0.0.1:3306)/db_recook_v2?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
|
|
|
|
|
Idle: 10,
|
|
|
|
|
Active: 500,
|
|
|
|
|
}
|
|
|
|
@ -42,7 +42,7 @@ func SetupMysql() {
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
c = &MysqlConfig{
|
|
|
|
|
Dsn: "db_recook_super:sduEb9MTSiqhweXGpxa0@123@tcp(139.196.147.232:3306)/db_recook?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
|
|
|
|
|
Dsn: "db_recook_v2:H6568h4Y7BDsWcYe@tcp(127.0.0.1:3306)/db_recook_v2?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
|
|
|
|
|
Idle: 10,
|
|
|
|
|
Active: 500,
|
|
|
|
|
}
|
|
|
|
@ -81,15 +81,15 @@ func SetupMysql() {
|
|
|
|
|
func SetupNewMysql() {
|
|
|
|
|
if configs.IsProductionEnv() {
|
|
|
|
|
err := mysql2.InitMysql(&mysql2.DbConfig{
|
|
|
|
|
Username: "db_recook_super",
|
|
|
|
|
Password: "sduEb9MTSiqhweXGpxa0@123",
|
|
|
|
|
Username: "db_recook_v2",
|
|
|
|
|
Password: "H6568h4Y7BDsWcYe",
|
|
|
|
|
Host: "127.0.0.1",
|
|
|
|
|
Port: 3306,
|
|
|
|
|
Extend: "timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8\n",
|
|
|
|
|
LogLevel: 4,
|
|
|
|
|
MaxIdleConns: 10,
|
|
|
|
|
MaxOpenConns: 500,
|
|
|
|
|
DbName: "db_recook",
|
|
|
|
|
DbName: "db_recook_v2",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
@ -97,15 +97,15 @@ func SetupNewMysql() {
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
err := mysql2.InitMysql(&mysql2.DbConfig{
|
|
|
|
|
Username: "db_recook_super",
|
|
|
|
|
Password: "sduEb9MTSiqhweXGpxa0@123",
|
|
|
|
|
Host: "139.196.147.232",
|
|
|
|
|
Username: "db_recook_v2",
|
|
|
|
|
Password: "H6568h4Y7BDsWcYe",
|
|
|
|
|
Host: "127.0.0.1",
|
|
|
|
|
Port: 3306,
|
|
|
|
|
Extend: "timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8\n",
|
|
|
|
|
LogLevel: 4,
|
|
|
|
|
MaxIdleConns: 10,
|
|
|
|
|
MaxOpenConns: 500,
|
|
|
|
|
DbName: "db_recook",
|
|
|
|
|
DbName: "db_recook_v2",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|