MySQL includes two plugins that implement the same kind of
native authentication that older servers provide; that is,
authentication against passwords stored in the
Password column of the
mysql.user table:
The mysql_native_password authentication
plugin implements the same default authentication against
the mysql.user table as used prior to the
implementation of pluggable authentication.
The mysql_old_password plugin implements
authentication as used before MySQL 4.1.1 that is based on
shorter password hash values. For information about this
authentication method, see
Section 6.1.2.4, “Password Hashing in MySQL”.
The native authentication plugins are backward compatible. Clients older than MySQL 5.5.7 do not support authentication plugins but use native authentication, so they can connect to servers from 5.5.7 and up.
The following tables show the plugin names. Both are considered to implement native authentication even though only one has “native” in the name.
Table 6.8. MySQL Native Password Authentication Plugin
| Server-side plugin name | mysql_native_password |
| Client-side plugin name | mysql_native_password |
| Library object file name | None (plugins are built in) |
Table 6.9. MySQL Native Old-Password Authentication Plugin
| Server-side plugin name | mysql_old_password |
| Client-side plugin name | mysql_old_password |
| Library object file name | None (plugins are built in) |
Each plugin exists in both client and server form. MySQL client
programs use mysql_native_password by
default. The --default-auth option
can be used to specify either plugin explicitly:
shell>mysql --default-auth=mysql_native_password ...shell>mysql --default-auth=mysql_old_password ...
The server-side plugins are built into the server, need not be
loaded explicitly, and cannot be disabled by unloading them. The
client-side plugins are built into the
libmysqlclient client library as of MySQL
5.5.7 and available to any program linked against
libmysqlclient from that version or newer.
For general information about pluggable authentication in MySQL, see Section 6.3.6, “Pluggable Authentication”.