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


6.3.18 X Protocol and X DevAPI

  • xdevapi.auth

    Authentication mechanism to use with the X Protocol. Allowed values are "SHA256_MEMORY", "MYSQL41", "PLAIN", and "EXTERNAL". Value is case insensitive. If the property is not set, the mechanism is chosen depending on the connection type: "PLAIN" is used for TLS connections and "SHA256_MEMORY" or "MYSQL41" is used for unencrypted connections.

    Default Value PLAIN
    Since Version 8.0.8
  • xdevapi.compression

    X DevAPI-specific network traffic compression. This option accepts one of the three values: "PREFERRED", "REQUIRED", and "DISABLED". Setting this option to "PREFERRED" or "REQUIRED" enables compression algorithm negotiation between Connector and Server, and turns on compression of large X Protocol packets, as long as a consensus is reached between client and server regarding the compression algorithm to use. If a consensus cannot be reached, connection fails if the option is set to "REQUIRED" and continues without compression if the option is set to "PREFERRED". Setting this option as "DISABLED" skips the compression negotiation phase and forbids the interchange of compressed messages between client and server.

    Default Value PREFERRED
    Since Version 8.0.20
  • xdevapi.compression-algorithms

    A comma-delimited list of compression algorithms, each one identified by its name and operating mode (e.g. "lz4_message" -- consult the description for the MySQL global variable 'mysqlx_compression_algorithms' for a list of supported and enabled algorithms), that defines the order and which algorithms will be attempted when negotiating connection compression with the server.

    The compression algorithm 'deflate_stream' is supported natively. Additional compression algorithms require using third-party libraries and enabling them with the connection property 'xdevapi.compression-extensions'.

    This option is meaningful only when network traffic compression is enabled using the connection property 'xdevapi.compression'.

    As an alternative to the default algorithm names, that contain a reference to the compression operation mode, the aliases "zstd", "lz4", and "deflate" can be used instead of "zstd_stream", "lz4_message", and "deflate_stream".

    Default Value zstd_stream,lz4_message,deflate_stream
    Since Version 8.0.22
  • xdevapi.compression-extensions

    A comma-delimited list of triplets, with their elements delimited by colon, that enables the support for additional compression algorithms. Each triplet must contain: first, an algorithm name and operating mode (e.g. "lz4_message" -- consult the description for the MySQL global variable 'mysqlx_compression_algorithms' for a list of supported and enabled algorithms); second, a fully-qualified class name of a class implementing the interface java.io.InputStream that will be used to inflate data compressed with the named algorithm; third, a fully-qualified class name of a class implementing the interface java.io.OutputStream that will be used to deflate data using the named algorithm. Along with this setting, the library containing implementations of the designated classes must be available in the applications class path.

    Any number of triplets defining compression algorithms and their inflater and deflater implementations can be provided but only the ones supported and enabled on the MySQL Server can be used.

    The compression algorithm 'deflate_stream' is supported natively. Additional compression algorithms require using third-party libraries.

    This option is meaningful only when network traffic compression is enabled using the connection property 'xdevapi.compression'.

    As an alternative to the default algorithm names, that contain a reference to the compression operation mode, the aliases "zstd", "lz4", and "deflate" can be used instead of "zstd_stream", "lz4_message", and "deflate_stream".

    Since Version 8.0.22
  • xdevapi.connect-timeout

    X DevAPI-specific timeout for socket connect (in milliseconds), with "0" being no timeout. Defaults to "10000". If 'xdevapi.connect-timeout' is not set explicitly and 'connectTimeout' is, 'xdevapi.connect-timeout' takes up the value of 'connectTimeout'. If 'xdevapi.useAsyncProtocol=true', both 'xdevapi.connect-timeout' and 'connectTimeout' are ignored.

    Default Value 10000
    Since Version 8.0.13
  • xdevapi.connection-attributes

    An X DevAPI-specific comma-delimited list of user-defined key=value pairs (in addition to standard X Protocol-defined key=value pairs) to be passed to MySQL Server for display as connection attributes in PERFORMANCE_SCHEMA tables session_account_connect_attrs and session_connect_attrs. Example usage: xdevapi.connection-attributes=key1=value1,key2=value2 or xdevapi.connection-attributes=[key1=value1,key2=value2]. This functionality is available for use with MySQL Server version 8.0.16 or later only. Earlier versions of X Protocol do not support connection attributes, causing this configuration option to be ignored. For situations where Session creation/initialization speed is critical, setting xdevapi.connection-attributes=false will cause connection attribute processing to be bypassed.

    Since Version 8.0.16
  • xdevapi.dns-srv

    X DevAPI-specific option for instructing 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
  • xdevapi.fallback-to-system-keystore

    X DevAPI-specific switch to specify whether in the absence of a set value for 'xdevapi.ssl-keystore' (or 'clientCertificateKeyStoreUrl'), Connector/J falls back to using the system-wide key store defined through the system properties 'javax.net.ssl.keyStore*'. If not specified, the value of 'fallbackToSystemKeyStore' is used.

    Default Value true
    Since Version 8.0.22
  • xdevapi.fallback-to-system-truststore

    X DevAPI-specific switch to specify whether in the absence of a set value for 'xdevapi.ssl-truststore' (or 'trustCertificateKeyStoreUrl'), Connector/J falls back to using the system-wide default trust store or one defined through the system properties 'javax.net.ssl.trustStore*'. If not specified, the value of 'fallbackToSystemTrustStore' is used.

    Default Value true
    Since Version 8.0.22
  • xdevapi.ssl-keystore

    X DevAPI-specific URL for the client certificate key store. If not specified, use 'clientCertificateKeyStoreUrl' value.

    Since Version 8.0.22
  • xdevapi.ssl-keystore-password

    X DevAPI-specific password for the client certificate key store. If not specified, use 'clientCertificateKeyStorePassword' value.

    Since Version 8.0.22
  • xdevapi.ssl-keystore-type

    X DevAPI-specific type of the client certificate key store. If not specified, use 'clientCertificateKeyStoreType' value.

    Default Value JKS
    Since Version 8.0.22
  • xdevapi.ssl-mode

    X DevAPI-specific SSL mode setting. If not specified, use 'sslMode'. Because the "PREFERRED" mode is not applicable to X Protocol, if 'xdevapi.ssl-mode' is not set and 'sslMode' is set to "PREFERRED", 'xdevapi.ssl-mode' is set to "REQUIRED".

    Default Value REQUIRED
    Since Version 8.0.7
  • xdevapi.ssl-truststore

    X DevAPI-specific URL for the trusted CA certificates key store. If not specified, use 'trustCertificateKeyStoreUrl' value.

    Since Version 6.0.6
  • xdevapi.ssl-truststore-password

    X DevAPI-specific password for the trusted CA certificates key store. If not specified, use 'trustCertificateKeyStorePassword' value.

    Since Version 6.0.6
  • xdevapi.ssl-truststore-type

    X DevAPI-specific type of the trusted CA certificates key store. If not specified, use 'trustCertificateKeyStoreType' value.

    Default Value JKS
    Since Version 6.0.6
  • xdevapi.tls-ciphersuites

    X DevAPI-specific property overriding the cipher suites enabled for use on the underlying SSL sockets. If not specified, the value of 'enabledSSLCipherSuites' is used.

    Since Version 8.0.19
  • xdevapi.tls-versions

    X DevAPI-specific property overriding the TLS protocols enabled for use on the underlying SSL sockets. If not specified, the value of 'enabledTLSProtocols' is used.

    Since Version 8.0.19