Documentation Home
MySQL Connector/J 8.0 Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.8Mb
PDF (A4) - 0.8Mb
HTML Download (TGZ) - 146.6Kb
HTML Download (Zip) - 166.0Kb


6.3.4 Networking

  • socksProxyHost

    Name or IP address of SOCKS host to connect through.

    Since Version 5.1.34
  • socksProxyPort

    Port of SOCKS server.

    Default Value 1080
    Since Version 5.1.34
  • socketFactory

    The name of the class that the driver should use for creating socket connections to the server. This class must implement the interface 'com.mysql.cj.protocol.SocketFactory' and have public no-args constructor.

    Default Value com.mysql.cj.protocol.StandardSocketFactory
    Since Version 3.0.3
  • connectTimeout

    Timeout for socket connect (in milliseconds), with 0 being no timeout. Only works on JDK-1.4 or newer. Defaults to '0'.

    Default Value 0
    Since Version 3.0.1
  • socketTimeout

    Timeout (in milliseconds) on network socket operations (0, the default means no timeout).

    Default Value 0
    Since Version 3.0.1
  • dnsSrv

    Should the driver use the given host name to lookup for DNS SRV records and use the resulting list of hosts in a multi-host failover connection? Note that a single host name and no port must be provided when this option is enabled.

    Default Value false
    Since Version 8.0.19
  • localSocketAddress

    Hostname or IP address given to explicitly configure the interface that the driver will bind the client side of the TCP/IP connection to when connecting.

    Since Version 5.0.5
  • maxAllowedPacket

    Maximum allowed packet size to send to server. If not set, the value of system variable 'max_allowed_packet' will be used to initialize this upon connecting. This value will not take effect if set larger than the value of 'max_allowed_packet'. Also, due to an internal dependency with the property "blobSendChunkSize", this setting has a minimum value of "8203" if "useServerPrepStmts" is set to "true".

    Default Value 65535
    Since Version 5.1.8
  • tcpKeepAlive

    If connecting using TCP/IP, should the driver set SO_KEEPALIVE?

    Default Value true
    Since Version 5.0.7
  • tcpNoDelay

    If connecting using TCP/IP, should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm)?

    Default Value true
    Since Version 5.0.7
  • tcpRcvBuf

    If connecting using TCP/IP, should the driver set SO_RCV_BUF to the given value? The default value of '0', means use the platform default value for this property)

    Default Value 0
    Since Version 5.0.7
  • tcpSndBuf

    If connecting using TCP/IP, should the driver set SO_SND_BUF to the given value? The default value of '0', means use the platform default value for this property)

    Default Value 0
    Since Version 5.0.7
  • tcpTrafficClass

    If connecting using TCP/IP, should the driver set traffic class or type-of-service fields ?See the documentation for java.net.Socket.setTrafficClass() for more information.

    Default Value 0
    Since Version 5.0.7
  • useCompression

    Use zlib compression when communicating with the server (true/false)?

    Default Value false
    Since Version 3.0.17
  • useUnbufferedInput

    Don't use BufferedInputStream for reading data from the server

    Default Value true
    Since Version 3.0.11