| 1 |
call mtr.add_suppression("Maximum number of authentication attempts reached, login failed"); |
| 2 |
call mtr.add_suppression("Access denied for user .*"); |
| 3 |
INSTALL PLUGIN test_plugin_server SONAME 'auth_test_plugin.so'; |
| 4 |
INSTALL PLUGIN mysql_no_login SONAME 'mysql_no_login.so'; |
| 5 |
CREATE USER xuser_test@localhost |
| 6 |
IDENTIFIED WITH 'test_plugin_server' BY 'test'; |
| 7 |
GRANT ALL ON *.* TO xuser_test@localhost; |
| 8 |
CREATE USER xuser_nologin@localhost |
| 9 |
IDENTIFIED WITH 'mysql_no_login' BY 'nologin'; |
| 10 |
GRANT ALL ON *.* TO xuser_nologin@localhost; |
| 11 |
Show users |
| 12 |
SELECT user, plugin FROM mysql.user WHERE user LIKE 'xuser%'; |
| 13 |
user plugin |
| 14 |
xuser_nologin mysql_no_login |
| 15 |
xuser_test test_plugin_server |
| 16 |
user plugin |
| 17 |
x_root mysql_native_password |
| 18 |
0 rows affected |
| 19 |
Variable_name Value |
| 20 |
Mysqlx_ssl_active OFF |
| 21 |
0 rows affected |
| 22 |
Mysqlx.Ok { |
| 23 |
msg: "bye!" |
| 24 |
} |
| 25 |
ok |
| 26 |
user plugin |
| 27 |
x_root mysql_native_password |
| 28 |
0 rows affected |
| 29 |
Variable_name Value |
| 30 |
Mysqlx_ssl_active ON |
| 31 |
0 rows affected |
| 32 |
Mysqlx.Ok { |
| 33 |
msg: "bye!" |
| 34 |
} |
| 35 |
ok |
| 36 |
Ssl connection by test plugin -> fail |
| 37 |
Application terminated with expected error: Access denied for user 'xuser_test'@'localhost' (using password: YES) (code 1045) |
| 38 |
ok |
| 39 |
Plain connection by test plugin -> fail |
| 40 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 41 |
ok |
| 42 |
Ssl connection by no_login plugin -> fail |
| 43 |
Application terminated with expected error: Access denied for user 'xuser_nologin'@'localhost' (using password: YES) (code 1045) |
| 44 |
ok |
| 45 |
Ssl connection by no_login plugin -> fail |
| 46 |
Application terminated with expected error: Access denied for user 'xuser_nologin'@'localhost' (using password: YES) (code 1045) |
| 47 |
ok |
| 48 |
DROP USER xuser_test@localhost; |
| 49 |
DROP USER xuser_nologin@localhost; |
| 50 |
UNINSTALL PLUGIN test_plugin_server; |
| 51 |
UNINSTALL PLUGIN mysql_no_login; |