Documentation Home
Security in MySQL
Related Documentation Download this Excerpt
PDF (US Ltr) - 0.7Mb
PDF (A4) - 0.7Mb
EPUB - 176.9Kb
HTML Download (TGZ) - 144.4Kb
HTML Download (Zip) - 154.4Kb


Security in MySQL  /  ...  /  Installing the PAM Authentication Plugin

7.1.3.1 Installing the PAM Authentication Plugin

The PAM authentication plugin must be located in the MySQL plugin directory (the directory named by the plugin_dir system variable). If necessary, set the value of plugin_dir at server startup to tell the server the location of the plugin directory.

To enable the plugin, start the server with the --plugin-load option. For example, put the following lines in your my.cnf file. If library files have a suffix different from .so on your system, substitute the correct suffix.

[mysqld]
plugin-load=authentication_pam.so

To verify plugin installation, examine the INFORMATION_SCHEMA.PLUGINS table or use the SHOW PLUGINS statement (see Obtaining Server Plugin Information). For example:

mysql> SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS
    -> WHERE PLUGIN_NAME LIKE 'authentication%';
+--------------------+---------------+
| PLUGIN_NAME        | PLUGIN_STATUS |
+--------------------+---------------+
| authentication_pam | ACTIVE        |
+--------------------+---------------+

To associate a MySQL account with the PAM plugin, use the plugin name authentication_pam in the IDENTIFIED WITH clause of CREATE USER or GRANT statement that creates the account.


User Comments
Sign Up Login You must be logged in to post a comment.