-
Notifications
You must be signed in to change notification settings - Fork 479
[配置]datasource
jamie12221 edited this page Nov 29, 2020
·
1 revision
{
"dbType": "jdbc",
"idleTimeout": 60000,
"initSqls": [],
"initSqlsGetConnection": true,
"instanceType": "READ_WRITE",
"maxCon": 1000,
"maxConnectTimeout": 3000,
"maxRetryCount": 5,
"minCon": 1,
"name": "prototype",
"password": "123456",
"type": "JDBC",
"url": "jdbc:mysql://127.0.0.1:3306?useUnicode=true&serverTimezone=UTC",
"user": "root",
"weight": 0
}
prototype.datasource.json
{数据源名字}.datasource.json 保存在datasources文件夹
单位millis,配置中的定时器主要作用是定时检查闲置连接
true|false,默认:false,对于jdbc每次获取连接是否都执行initSqls
数据源类型
NATIVE,只使用NATIVE协议(即Mycat自研的连接MySQL的协议)
JDBC,默认,只使用JDBC驱动连接
NATIVE_JDBC,该数据源同一个配置同时可以使用NATIVE,JDBC