content_image/814494.jpg
ON ’proxied_user’@’localhost’ TO ’proxy_user’@’localhost’; 

This enables clients to access MySQL through the proxy account ( proxy_user ) but not to bypass the proxy mechanism by connecting directly as the proxied user ( proxied_user ). A client who connects using the proxy_user  account has the privileges of the proxied_user  account, but proxied_user itself cannot be used to connect. 

For alternative methods of protecting proxied accounts against direct use, see Preventing Direct Login to Proxied Accounts. 

## 6.4.1.9 Socket Peer-Credential Pluggable Authentication 

The server-side auth_socket  authentication plugin authenticates clients that connect from the local host through the Unix socket file. The plugin uses the SO_PEERCRED  socket option to obtain information about the user running the client program. Thus, the plugin can be used only on systems that support the SO_PEERCRED  option, such as Linux. 

The source code for this plugin can be examined as a relatively simple example demonstrating how to write a loadable authentication plugin. 

The following table shows the plugin and library file names. The file must be located in the directory named by the plugin_dir  system variable. 

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

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

•Installing Socket Pluggable Authentication 

•Uninstalling Socket Pluggable Authentication 

•Using Socket Pluggable Authentication 

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

## Installing Socket Pluggable Authentication 

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

To be usable by the server, the plugin library file must be located in the MySQL plugin directory (the directory named by the plugin_dir  system variable). If necessary, configure the plugin directory location by setting the value of plugin_dir  at server startup. 

To load the plugin at server startup, use the --plugin-load-add  option to name the library file that contains it. With this plugin-loading method, the option must be given each time the server starts. For example, put these lines in the server my.cnf  file: 

[mysqld] 

