2020年/01月/10日

首页回退

JDBC MYSQL属性

语法

protocol//[hosts][/database][?properties]

协议列表

jdbc:mysql:
jdbc:mysql:loadbalance:
jdbc:mysql:replication: 

连接和认证

user
password
socketFactory
connectTimeout
socketTimeout
connectionLifecycleInterceptors
useConfigs
authenticationPlugins
defaultAuthenticationPlugin
disabledAuthenticationPlugins
disconnectOnExpiredPasswords
interactiveClient
localSocketAddress
propertiesTransform
useCompression

网络

socksProxyHost
socksProxyPort
maxAllowedPacket
tcpKeepAlive
tcpNoDelay
tcpRcvBuf
tcpSndBuf
tcpTrafficClass

高可用和集群

autoReconnect
autoReconnectForPools
failOverReadOnly
maxReconnects
reconnectAtTxEnd
retriesAllDown
initialTimeout
roundRobinLoadBalance
queriesBeforeRetryMaster
secondsBeforeRetryMaster
allowMasterDownConnections
allowSlaveDownConnections
readFromMasterWhenNoSlaves
replicationEnableJMX
selfDestructOnPingMaxOperations
selfDestructOnPingSecondsLifetime
replicationConnectionGroup
resourceId

安全

allowMultiQueries
useSSL
requireSSL
verifyServerCertificate
clientCertificateKeyStoreUrl
clientCertificateKeyStoreType
clientCertificateKeyStorePassword
trustCertificateKeyStoreUrl
trustCertificateKeyStoreType
trustCertificateKeyStorePassword
enabledSSLCipherSuites
enabledTLSProtocols
allowLoadLocalInfile
allowUrlInLocalInfile
allowPublicKeyRetrieval
paranoid
passwordCharacterEncoding
serverRSAPublicKeyFile

性能扩展

callableStmtCacheSize
metadataCacheSize
useLocalSessionState
useLocalTransactionState
prepStmtCacheSize
prepStmtCacheSqlLimit
parseInfoCacheFactory
serverConfigCacheFactory
alwaysSendSetIsolation
maintainTimeStats
useCursorFetch
blobSendChunkSize
cacheCallableStmts
cachePrepStmts
cacheResultSetMetadata
cacheServerConfiguration
defaultFetchSize
dontCheckOnDuplicateKeyUpdateInSQL
dontTrackOpenResources
dynamicCalendars
elideSetAutoCommits
enableEscapeProcessing
enableQueryTimeouts
holdResultsOpenOverStatementClose
largeRowSizeThreshold
loadBalanceStrategy
locatorFetchBufferSize
readOnlyPropagatesToServer
rewriteBatchedStatements
serverAffinityOrder
useDirectRowUnpack
useDynamicCharsetInfo
useFastDateParsing
useFastIntParsing
useJvmCharsetConverters
useReadAheadInput

调试度量

logger
gatherPerfMetrics
profileSQL
profileSql
reportMetricsIntervalMillis
maxQuerySizeToLog
packetDebugBufferSize
slowQueryThresholdMillis
slowQueryThresholdNanos
useUsageAdvisor
autoGenerateTestcaseScript
autoSlowLog
clientInfoProvider
dumpMetadataOnColumnNotFound
dumpQueriesOnException
enablePacketDebug
explainSlowQueries
includeInnodbStatusInDeadlockExceptions
includeThreadDumpInDeadlockExceptions
includeThreadNamesAsStatementComment
logSlowQueries
logXaCommands
profilerEventHandler
resultSetSizeThreshold
traceProtocol
useNanosForElapsedTime

杂项

useUnicode
characterEncoding
characterSetResults
connectionAttributes
connectionCollation
useBlobToStoreUTF8OutsideBMP
utf8OutsideBmpExcludedColumnNamePattern
utf8OutsideBmpIncludedColumnNamePattern
loadBalanceEnableJMX
loadBalanceHostRemovalGracePeriod
sessionVariables
useColumnNamesInFindColumn
allowNanAndInf
autoClosePStmtStreams
autoDeserialize
blobsAreStrings
cacheDefaultTimezone
capitalizeTypeNames
clobCharacterEncoding
clobberStreamingResults
compensateOnDuplicateKeyUpdateCounts
continueBatchOnError
createDatabaseIfNotExist
detectCustomCollations
emptyStringsConvertToZero
emulateLocators
emulateUnsupportedPstmts
exceptionInterceptors
functionsNeverReturnBlobs
generateSimpleParameterMetadata
getProceduresReturnsFunctions
ignoreNonTxTables
jdbcCompliantTruncation
loadBalanceAutoCommitStatementRegex
loadBalanceAutoCommitStatementThreshold
loadBalanceBlacklistTimeout
loadBalanceConnectionGroup
loadBalanceExceptionChecker
loadBalancePingTimeout
loadBalanceSQLExceptionSubclassFailover
loadBalanceSQLStateFailover
loadBalanceValidateConnectionOnSwapServer
maxRows
netTimeoutForStreamingResults
noAccessToProcedureBodies
noDatetimeStringSync
noTimezoneConversionForDateType
noTimezoneConversionForTimeType
nullCatalogMeansCurrent
nullNamePatternMatchesAll
overrideSupportsIntegrityEnhancementFacility
padCharsWithSpace
pedantic
pinGlobalTxToPhysicalConnection
populateInsertRowWithDefaultValues
processEscapeCodesForPrepStmts
queryTimeoutKillsConnection
relaxAutoCommit
retainStatementAfterResultSetClose
rollbackOnPooledClose
runningCTS13
sendFractionalSeconds
serverTimezone
statementInterceptors
strictFloatingPoint
strictUpdates
tinyInt1isBit
transformedBitIsBoolean
treatUtilDateAsTimestamp
ultraDevHack
useAffectedRows
useGmtMillisForDatetimes
useHostsInPrivileges
useInformationSchema
useJDBCCompliantTimezoneShift
useLegacyDatetimeCode
useOldAliasMetadataBehavior
useOldUTF8Behavior
useOnlyServerErrorMessages
useSSPSCompatibleTimezoneShift
useServerPrepStmts
useSqlStateCodes
useStreamLengthsInPrepStmts
useTimezone
useUnbufferedInput
yearIsDateType
zeroDateTimeBehavior

参考