Yeah, It works before 5.7, I tested it with Percona Server 5.5 and 5.6 but couldn't reproduced same problem.
master [localhost] {root} ((none)) > SHOW VARIABLES LIKE '%version%'; +-------------------------+------------------------------------------------------+ | Variable_name | Value | +-------------------------+------------------------------------------------------+ | innodb_version | 5.6.36-rel82.0 | | protocol_version | 10 | | slave_type_conversions | | | tls_version | TLSv1.1,TLSv1.2 | | version | 5.6.36-82.0-log | | version_comment | Percona Server (GPL), Release 82.0, Revision 58e846a | | version_compile_machine | x86_64 | | version_compile_os | Linux | +-------------------------+------------------------------------------------------+ 8 rows in set (0.00 sec)
master [localhost] {root} ((none)) > show plugins; +-----------------------------+----------+--------------------+----------------+---------+ | Name | Status | Type | Library | License | +-----------------------------+----------+--------------------+----------------+---------+ | auth_socket | ACTIVE | AUTHENTICATION | auth_socket.so | GPL | +-----------------------------+----------+--------------------+----------------+---------+
slave1 [localhost] {msandbox} ((none)) > show plugins; +-----------------------------+----------+--------------------+----------------+---------+ | Name | Status | Type | Library | License | +-----------------------------+----------+--------------------+----------------+---------+ | auth_socket | ACTIVE | AUTHENTICATION | auth_socket.so | GPL | +-----------------------------+----------+--------------------+----------------+---------+
slave2 [localhost] {msandbox} ((none)) > show plugins; +-----------------------------+----------+--------------------+----------------+---------+ | Name | Status | Type | Library | License | +-----------------------------+----------+--------------------+----------------+---------+ | auth_socket | ACTIVE | AUTHENTICATION | auth_socket.so | GPL | +-----------------------------+----------+--------------------+----------------+---------+
master [localhost] {root} ((none)) > CREATE USER 'employee_ext'@'localhost' IDENTIFIED WITH auth_socket AS 'my_auth_string'; Query OK, 0 rows affected (0.01 sec)
master [localhost] {root} ((none)) > CREATE USER 'employee'@'localhost' IDENTIFIED BY 'employee_pass'; Query OK, 0 rows affected (0.00 sec)
master [localhost] {root} ((none)) > GRANT PROXY ON 'employee'@'localhost' TO 'employee_ext'@'localhost'; Query OK, 0 rows affected (0.01 sec)
master [localhost] {root} ((none)) > select * from mysql.proxies_priv where Proxied_user='employee'\G *************************** 1. row *************************** Host: localhost User: employee_ext Proxied_host: localhost Proxied_user: employee With_grant: 0 Grantor: root@localhost Timestamp: 0000-00-00 00:00:00 1 row in set (0.00 sec)
slave1 [localhost] {msandbox} ((none)) > select * from mysql.proxies_priv where Proxied_user='employee'\G *************************** 1. row *************************** Host: localhost User: employee_ext Proxied_host: localhost Proxied_user: employee With_grant: 0 Grantor: root@localhost Timestamp: 0000-00-00 00:00:00 1 row in set (0.00 sec)
slave2 [localhost] {msandbox} ((none)) > select * from mysql.proxies_priv where Proxied_user='employee'\G *************************** 1. row *************************** Host: localhost User: employee_ext Proxied_host: localhost Proxied_user: employee With_grant: 0 Grantor: root@localhost Timestamp: 0000-00-00 00:00:00 1 row in set (0.01 sec)
Yeah, It works before 5.7, I tested it with Percona Server 5.5 and 5.6 but couldn't reproduced same problem.
master [localhost] {root} ((none)) > SHOW VARIABLES LIKE '%version%'; ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- ----+ ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- ----+ conversions | | compile_ machine | x86_64 | ------- ------- -----+- ------- ------- ------- ------- ------- ------- ------- ----+
+------
| Variable_name | Value |
+------
| innodb_version | 5.6.36-rel82.0 |
| protocol_version | 10 |
| slave_type_
| tls_version | TLSv1.1,TLSv1.2 |
| version | 5.6.36-82.0-log |
| version_comment | Percona Server (GPL), Release 82.0, Revision 58e846a |
| version_
| version_compile_os | Linux |
+------
8 rows in set (0.00 sec)
master [localhost] {root} ((none)) > show plugins; ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+ ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+ ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+
+------
| Name | Status | Type | Library | License |
+------
| auth_socket | ACTIVE | AUTHENTICATION | auth_socket.so | GPL |
+------
slave1 [localhost] {msandbox} ((none)) > show plugins; ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+ ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+ ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+
+------
| Name | Status | Type | Library | License |
+------
| auth_socket | ACTIVE | AUTHENTICATION | auth_socket.so | GPL |
+------
slave2 [localhost] {msandbox} ((none)) > show plugins; ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+ ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+ ------- ------- ------- --+---- ------+ ------- ------- ------+ ------- ------- --+---- -----+
+------
| Name | Status | Type | Library | License |
+------
| auth_socket | ACTIVE | AUTHENTICATION | auth_socket.so | GPL |
+------
master [localhost] {root} ((none)) > CREATE USER 'employee_ ext'@'localhost ' IDENTIFIED WITH auth_socket AS 'my_auth_string';
Query OK, 0 rows affected (0.01 sec)
master [localhost] {root} ((none)) > CREATE USER 'employee' @'localhost' IDENTIFIED BY 'employee_pass';
Query OK, 0 rows affected (0.00 sec)
master [localhost] {root} ((none)) > GRANT PROXY ON 'employee' @'localhost' TO 'employee_ ext'@'localhost ';
Query OK, 0 rows affected (0.01 sec)
master [localhost] {root} ((none)) > select * from mysql.proxies_priv where Proxied_ user='employee' \G ******* ******* ****** 1. row ******* ******* ******* ******
*******
Host: localhost
User: employee_ext
Proxied_host: localhost
Proxied_user: employee
With_grant: 0
Grantor: root@localhost
Timestamp: 0000-00-00 00:00:00
1 row in set (0.00 sec)
slave1 [localhost] {msandbox} ((none)) > select * from mysql.proxies_priv where Proxied_ user='employee' \G ******* ******* ****** 1. row ******* ******* ******* ******
*******
Host: localhost
User: employee_ext
Proxied_host: localhost
Proxied_user: employee
With_grant: 0
Grantor: root@localhost
Timestamp: 0000-00-00 00:00:00
1 row in set (0.00 sec)
slave2 [localhost] {msandbox} ((none)) > select * from mysql.proxies_priv where Proxied_ user='employee' \G ******* ******* ****** 1. row ******* ******* ******* ******
*******
Host: localhost
User: employee_ext
Proxied_host: localhost
Proxied_user: employee
With_grant: 0
Grantor: root@localhost
Timestamp: 0000-00-00 00:00:00
1 row in set (0.01 sec)