W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
{
"dbType": "mysql",
"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,
"queryTimeout":30//mills
}
{數(shù)據(jù)源名字}.datasource.json 保存在datasources
文件夾
maxConnectTimeout
:單位millis
,配置中的定時(shí)器主要作用是定時(shí)檢查閑置連接initSqlsGetConnection
,true|false
,默認(rèn):false
,對(duì)于jdbc每次獲取連接是否都執(zhí)行initSqls
type
:數(shù)據(jù)源類型NATIVE
:只使用NATIVE
協(xié)議(即Mycat自研的連接MySQL的協(xié)議)JDBC
:默認(rèn),只使用JDBC驅(qū)動(dòng)連接NATIVE_JDBC
:該數(shù)據(jù)源同一個(gè)配置同時(shí)可以使用NATIVE
,JDBC
queryTimeout
:jdbc查詢超時(shí)時(shí)間 默認(rèn)30mills
JDBC
禁用SSL
屬性有助提高性能instanceType
:配置實(shí)例只讀還是讀寫,可選值:READ_WRITE
,READ
,WRITE
weight
:負(fù)載均衡特定用的權(quán)重Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: