content_image/672428.jpg content_image/672426.jpg
the plugin refuses the connection even for valerie  if the connection is made using a different protocol, such as TCP/IP. 

To permit both the valerie  and stephanie  operating system users to access MySQL through socket file connections that use the account, this can be done two ways: 

•Name both users at account-creation time, one following CREATE USER , and the other in the authentication string: 

CREATE USER ’valerie’@’localhost’ IDENTIFIED WITH auth_socket AS ’stephanie’; 

•If you have already used CREATE USER  to create the account for a single user, use ALTER USER  to add the second user: 

CREATE USER ’valerie’@’localhost’ IDENTIFIED WITH auth_socket; ALTER USER ’valerie’@’localhost’ IDENTIFIED WITH auth_socket AS ’stephanie’; 

To access the account, both valerie  and stephanie  specify --user=valerie  at connect time. 

## 6.4.1.10 Test Pluggable Authentication 

MySQL includes a test plugin that checks account credentials and logs success or failure to the server error log. This is a loadable plugin (not built in) and must be installed prior to use. 

The test plugin source code is separate from the server source, unlike the built-in native plugin, so it can be examined as a relatively simple example demonstrating how to write a loadable authentication plugin. 

<img src='content_image/672428.jpg'>

## Note 

This plugin is intended for testing and development purposes, and is not for use in production environments or on servers that are exposed to public networks. 

The following table shows the plugin and library file names. The file name suffix might differ on your system. The file must be located in the directory named by the plugin_dir  system variable. 

<img src='content_image/672426.jpg'>

The following sections provide installation and usage information specific to test pluggable authentication: 

•Installing Test Pluggable Authentication 

•Uninstalling Test Pluggable Authentication 

•Using Test Pluggable Authentication 

For general information about pluggable authentication in MySQL, see Section 6.2.17, “Pluggable Authentication” . 

## Installing Test Pluggable Authentication 

This section describes how to install the test authentication plugin. For general information about installing plugins, see Section 5.6.1, “Installing and Uninstalling Plugins” . 

