Pre-General Availability Draft: 2017-08-17
A client-side authentication plugin is available that sends the password to the server without hashing or encryption. This plugin is built into the MySQL client library.
The following table shows the plugin name.
Table 6.12 Plugin and Library Names for Cleartext Authentication
|Server-side plugin name||None, see discussion|
|Client-side plugin name|
|Library file name||None (plugin is built in)|
With many MySQL authentication methods, the client performs hashing or encryption of the password before sending it to the server. This enables the client to avoid sending the password in clear text.
Hashing or encryption cannot be done for authentication schemes
that require the server to receive the password as entered on
the client side. In such cases, the client-side
mysql_clear_password plugin is used to send
the password to the server in clear text. There is no
corresponding server-side plugin. Rather, the client-side plugin
can be used by any server-side plugin that needs a cleartext
password. (The PAM authentication plugin is one such; see
PAM Pluggable Authentication.)
The following discussion provides usage information specific to clear text pluggable authentication. For For general information about pluggable authentication in MySQL, see Section 6.3.10, “Pluggable Authentication”.
Sending passwords in clear text may be a security problem in some configurations. To avoid problems if there is any possibility that the password would be intercepted, clients should connect to MySQL Server using a method that protects the password. Possibilities include SSL (see Section 6.4, “Using Secure Connections”), IPsec, or a private network.
To make inadvertent use of the
mysql_clear_password plugin less likely,
MySQL clients must explicitly enable it. This can be done
LIBMYSQL_ENABLE_CLEARTEXT_PLUGINenvironment variable to a value that begins with
y. This enables the plugin for all client connections.
mysql_options()C API function supports a
MYSQL_ENABLE_CLEARTEXT_PLUGINoption that enables the plugin on a per-connection basis. Also, any program that uses
libmysqlclientand reads option files can enable the plugin by including an
enable-cleartext-pluginoption in an option group read by the client library.