MySQL includes two plugins that implement native authentication;
that is, authentication against passwords stored in the
Password column of the
mysql.user table. This section describes
mysql_old_password, which implements
authentication against the
using the older (pre-4.1) password hashing method. For
which implements authentication using the native password
hashing method, see
Section 220.127.116.11, “The Native Authentication Plugin”. For information
about these password hashing methods, see
Section 18.104.22.168, “Password Hashing in MySQL”.
Passwords that use the pre-4.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided. Pre-4.1 passwords are deprecated and support for them will be removed in a future MySQL release. For account upgrade instructions, see Section 22.214.171.124, “Migrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin”.
mysql_old_password native authentication
plugin is backward compatible. Clients older than MySQL 5.5.7 do
not support authentication plugins but do
use the native authentication protocol, so
they can connect to servers from MySQL 5.5.7 and up.
The following table shows the plugin names on the server and client sides.
Table 6.10 MySQL Old Native Authentication Plugin
|Server-side plugin name|
|Client-side plugin name|
|Library file name||None (plugins are built in)|
The plugin exists in both client and server form:
The server-side plugin is built into the server, need not be loaded explicitly, and cannot be disabled by unloading it.
The client-side plugin is built into the
libmysqlclientclient library as of MySQL 5.5.7 and available to any program linked against
libmysqlclientfrom that version or higher.
MySQL client programs can use the
--default-authoption to specify the
mysql_old_passwordplugin as a hint about which client-side plugin the program can expect to use:
mysql --default-auth=mysql_old_password ...
If an account row specifies no plugin name, the server
authenticates the account using either the
mysql_old_password plugin, depending on
whether the password hash value in the
Password column used native hashing or the
older pre-4.1 hashing method. Clients must match the password in
Password column of the account row.
For general information about pluggable authentication in MySQL, see Section 6.3.7, “Pluggable Authentication”.