Documentation Home
MySQL Connector/J 5.1 Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 478.5Kb
PDF (A4) - 478.6Kb
EPUB - 146.0Kb
HTML Download (TGZ) - 119.5Kb
HTML Download (Zip) - 146.0Kb


5.1.1 Properties Files for the useConfigs Option

The useConfigs connection option is convenient shorthand for specifying combinations of options for particular scenarios. The argument values you can use with this option correspond to the names of .properties files within the Connector/J mysql-connector-java-version-bin.jar JAR file. For example, the Connector/J 5.1.9 driver includes the following configuration properties files:

$ unzip mysql-connector-java-5.1.19-bin.jar '*/configs/*'
Archive:  mysql-connector-java-5.1.19-bin.jar
   creating: com/mysql/jdbc/configs/
  inflating: com/mysql/jdbc/configs/3-0-Compat.properties
  inflating: com/mysql/jdbc/configs/5-0-Compat.properties
  inflating: com/mysql/jdbc/configs/clusterBase.properties
  inflating: com/mysql/jdbc/configs/coldFusion.properties
  inflating: com/mysql/jdbc/configs/fullDebug.properties
  inflating: com/mysql/jdbc/configs/maxPerformance.properties
  inflating: com/mysql/jdbc/configs/solarisMaxPerformance.properties

To specify one of these combinations of options, specify useConfigs=3-0-Compat, useConfigs=maxPerformance, and so on. The following sections show the options that are part of each useConfigs setting. For the details of why each one is included, see the comments in the .properties files.

3-0-Compat

emptyStringsConvertToZero=true
jdbcCompliantTruncation=false
noDatetimeStringSync=true
nullCatalogMeansCurrent=true
nullNamePatternMatchesAll=true
transformedBitIsBoolean=false
dontTrackOpenResources=true
zeroDateTimeBehavior=convertToNull
useServerPrepStmts=false
autoClosePStmtStreams=true
processEscapeCodesForPrepStmts=false
useFastDateParsing=false
populateInsertRowWithDefaultValues=false
useDirectRowUnpack=false

5-0-Compat

useDirectRowUnpack=false

clusterBase

autoReconnect=true
failOverReadOnly=false
roundRobinLoadBalance=true

coldFusion

useDynamicCharsetInfo=false
alwaysSendSetIsolation=false
useLocalSessionState=true
autoReconnect=true

fullDebug

profileSQL=true
gatherPerfMetrics=true
useUsageAdvisor=true
logSlowQueries=true
explainSlowQueries=true

maxPerformance

cachePrepStmts=true
cacheCallableStmts=true
cacheServerConfiguration=true
useLocalSessionState=true
elideSetAutoCommits=true
alwaysSendSetIsolation=false
enableQueryTimeouts=false

solarisMaxPerformance

useUnbufferedInput=false
useReadAheadInput=false
maintainTimeStats=false

User Comments
  Posted by Mario Schwede on November 19, 2016
I guess 'maxPerformance' should not be used because of this pretty old not resolved bug: https://bugs.mysql.com/bug.php?id=70785
Sign Up Login You must be logged in to post a comment.