mariadb/mysql-test/main/max_password_errors.result
Fariha Shaikh 212fad1b7e MDEV-36397 Record change_user command in MTR output
MTR .result files currently do not contain output to indicate if a
change_user command has been executed in the corresponding .test files.

Record change_user command in the following format in MTR output only if
disable_query_log is set to false: change_user <user>,<password>,<db>;

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2025-06-23 20:38:36 +02:00

63 lines
3.1 KiB
Text

set @old_max_password_errors=@@max_password_errors;
set global max_password_errors=2;
create user u identified by 'good_pass';
connect(localhost,u,bas_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bas_pass;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bad_pass;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
connect(localhost,u,good_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, good_pass;
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bad_pass;
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
FLUSH PRIVILEGES;
connect con1, localhost, u, good_pass;
disconnect con1;
connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bad_pass;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
connect con1, localhost, u, good_pass;
disconnect con1;
connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bad_pass;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
connect con1, localhost, u, good_pass;
change_user u,bad_pass,;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
change_user u,bad_pass,;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
change_user u,good_pass,;
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
disconnect con1;
connection default;
FLUSH PRIVILEGES;
connect(localhost,root,bas_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, root, bas_pass;
ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
connect(localhost,root,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, root, bad_pass;
ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
connect con1, localhost, u, good_pass;
disconnect con1;
connection default;
connect(localhost,u,bad_password,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bad_password;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
connect(localhost,u,bad_password,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bad_password;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
connect(localhost,u,good_pass,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, good_pass;
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
ALTER USER u ACCOUNT UNLOCK;
connect(localhost,u,bad_password,test,MASTER_PORT,MASTER_SOCKET);
connect con1, localhost, u, bad_password;
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
connect con1, localhost, u, good_pass;
disconnect con1;
connection default;
DROP USER u;
set global max_password_errors=@old_max_password_errors;