The Native Authentication Plugins
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_passwordauthentication plugin implements the same default authentication against themysql.usertable as used prior to the implementation of pluggable authentication. - The
mysql_old_passwordplugin Implements authentication as used before MariaDB that is based on shorter password hash values. For information about this authentication method, see , "Password Hashing in MySQL".
The native authentication plugins are backward compatible. Clients older than MariaDB 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 5.12. MariaDB Native Password Authentication Plugin
| Server-side plugin name | mysql_native_password
|
| Client-side plugin name | mysql_native_password
|
| Library object file name | None (built in) |
Table 5.13. MariaDB Native Old-Password Authentication Plugin
| Server-side plugin name | mysql_old_password
|
| Client-side plugin name | mysql_old_password
|
| Library object file name | None (built in) |
Each plugin exists in both client and server form. MariaDB 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 and cannot be disabled by unloading them. The client-side plugins are built into the libmysql client library as of MariaDB 5.5.7 and available to any program linked against libmysql from that version or newer.
For general information about pluggable authentication in MySQL, see , "Pluggable Authentication".