This section lists the JDBC connection properties supported by the MySQL driver and describes each property. The properties have the form:

property=value

You can use these connection properties with either the JDBC Driver Manager or the JDBC data sources unless otherwise noted.

Note: All connection property names are case-insensitive. For example, Password is the same as password. Required properties are noted as such
Note: The data type listed for each connection property is the Java data type used for the property value in a JDBC data source.

The following table provides a summary of the connection properties supported by the MySQL driver and their default values.

Table 1. MySQL Driver Properties
Property Default
AccountingInfo empty string
AlternateServers None
ApplicationName empty string
BulkLoadBatchSize 1000 (rows)
CatalogOptions 2
ClientHostName empty string
ClientUser empty string
CodePageOverride None
ConnectionRetryCount 5
ConnectionRetryDelay 1 (second)
ConvertNull 1 (data type check is performed if column value is null)
CryptoProtocolVersion

TLSv1

Database None
DatabaseName None
EncryptionMethod noEncryption
FailoverGranularity nonAtomic
FailoverMode connect
FailoverPreconnect false
HostNameInCertificate empty string
ImportStatementPool empty string
InitializationString None
InOrderColumnAccess false
InsensitiveResultSetBufferSize 2048 (KB of memory)
InteractiveClient false
JavaDoubleToString false
JDBCBehavior 1
KeyPassword None
KeyStore None
KeyStorePassword None
LoadBalancing false
LobCommandSize 1048576 (bytes)
LoginTimeout 0 (no timeout)
MaxPooledStatements 0 (driver’s internal prepared statement pooling is not enabled)
MaxStatements 0 (driver’s internal prepared statement pooling is not enabled)
Password None
PortNumber 3306
ProgramID empty string
ProxyHost None
ProxyPassword None
ProxyPort

0 which means that the default value is determined by whether the value specified for the ProxyHost property is an HTTP or HTTPS URL.

For HTTP: 80

For HTTPS: 443

ProxyUser None
QueryTimeout 0 (query does not time out)
RegisterStatementPoolMonitorMBean false
ResultSetMetaDataOptions 0 (no additional processing to determine the correct table name for each column in the result set)
ServerName None
SpyAttributes None
TreatBinaryAsChar false
TrustStore None
TrustStorePassword None
User None
ValidateServerCertificate true