1
INSTALL PLUGIN mysql_no_login SONAME 'mysql_no_login.so';
2
SELECT PLUGIN_NAME, PLUGIN_STATUS, PLUGIN_TYPE, PLUGIN_DESCRIPTION
3
FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'mysql_no_login';
4
PLUGIN_NAME mysql_no_login
6
PLUGIN_TYPE AUTHENTICATION
7
PLUGIN_DESCRIPTION No login authentication plugin
8
Creating users noauth, otheruser
9
Creating view, procedure, function
10
# Connect as otheruser - should succeed.
11
user() current_user() @@proxy_user
12
otheruser@localhost otheruser@localhost NULL
17
# Attempt to access underlying tables directly using otheruser - should fail.
18
# Connect as noauth - should fail.
19
#try to set password of this plugin user with password function - should warn
20
SET PASSWORD FOR noauth@localhost = password('');
22
Note 1699 SET PASSWORD has no significance for users authenticating via plugins
23
#try to set password of this plugin user with password hash - should warn
24
grant all on *.* to noauth@localhost identified by password '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
26
Warning 1699 SET PASSWORD has no significance for users authenticating via plugins
27
#try to expire password of this plugin user - should warn
28
alter user noauth@localhost password expire;
29
ERROR HY000: Operation ALTER USER failed for 'noauth'@'localhost'
30
#uninstall plugin and try to login with this plugin user - should return error
31
uninstall plugin mysql_no_login;
32
# Connect as noauth - should fail.
33
INSTALL PLUGIN mysql_no_login SONAME 'mysql_no_login.so';
34
Creating users noauth, otheruser
35
Creating view, procedure, function
36
# Connect as otheruser - should succeed.
37
user() current_user() @@proxy_user
38
otheruser@localhost otheruser@localhost NULL
43
# Attempt to access underlying tables directly using otheruser - should fail.