Documentation Home
MySQL Connector/J 8.0 Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.8Mb
PDF (A4) - 0.8Mb

6.3.1 Authentication

  • user

    The user to connect as

    Since Version all versions
  • password

    The password to use when connecting

    Since Version all versions
  • authenticationPlugins

    Comma-delimited list of classes that implement the interface com.mysql.cj.protocol.AuthenticationPlugin. These plugins will be loaded at connection initialization and can be used together with their sever-side counterparts for authenticating users, unless they are also disabled in the connection property 'disabledAuthenticationPlugins'.

    Since Version 5.1.19
  • disabledAuthenticationPlugins

    Comma-delimited list of authentication plugins client-side protocol names or classes implementing the interface com.mysql.cj.protocol.AuthenticationPlugin. The authentication plugins listed will not be used for authenticating users and, if anyone of them is required during the authentication exchange, the connection fails. The default authentication plugin specified in the property 'defaultAuthenticationPlugin' cannot be disabled.

    Since Version 5.1.19
  • defaultAuthenticationPlugin

    The default authentication plugin client-side protocol name or a fully qualified name of a class that implements the interface com.mysql.cj.protocol.AuthenticationPlugin. The specified authentication plugin must be either one of the built-in authentication plugins or one of the plugins listed in the property 'authenticationPlugins'. Additionally, the default authentication plugin cannot be disabled with the property 'disabledAuthenticationPlugins'. Neither an empty nor unknown plugin name or class can be set for this property.

    By default, Connector/J honors the server-side default authentication plugin, which is known after receiving the initial handshake packet, and falls back to this propertys default value if that plugin cannot be used. However, when a value is explicitly provided to this property, Connector/J then overrides the server-side default authentication plugin and always tries first the plugin specified with this property.

    Default Value mysql_native_password
    Since Version 5.1.19
  • ldapServerHostname

    When using MySQL's LDAP pluggable authentication with GSSAPI/Kerberos authentication method, allows setting the LDAP service principal hostname as configured in the Kerberos KDC. If this property is not set, Connector/J takes the system property '' and extracts the hostname (short name) from its value and uses it. If neither is set, the connection fails with an exception.

    Since Version 8.0.23