summaryrefslogtreecommitdiff
path: root/mysql-test/suite/plugins/r/password_reuse_check.result
blob: 5d797922c16b4787dd18fca57f2cc61ed852e920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
install soname "password_reuse_check";
set @save_password_reuse_check_interval= @@password_reuse_check_interval;
set global password_reuse_check_interval= 0;
# Default value (sould be unlimited i.e. 0)
SHOW GLOBAL VARIABLES like "password_reuse_check%";
Variable_name	Value
password_reuse_check_interval	0
# insert user
grant select on *.* to user_name@localhost identified by 'test_pwd';
grant select on *.* to user_name@localhost identified by 'test_pwd';
ERROR HY000: Your password does not satisfy the current policy requirements
show warnings;
Level	Code	Message
Error	1819	Your password does not satisfy the current policy requirements
alter user user_name@localhost identified by 'test_pwd';
ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
show warnings;
Level	Code	Message
Error	1819	Your password does not satisfy the current policy requirements
Error	1396	Operation ALTER USER failed for 'user_name'@'localhost'
# check exparation
set global password_reuse_check_interval= 10;
alter user user_name@localhost identified by 'test_pwd';
ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
show warnings;
Level	Code	Message
Error	1819	Your password does not satisfy the current policy requirements
Error	1396	Operation ALTER USER failed for 'user_name'@'localhost'
select hex(hash) from mysql.password_reuse_check_history;
hex(hash)
6276C87127F2B65FC6B24E94E324A02FF0D393D7FB7DEAF6F5F49F0A8AB006711D5C6EF67E36A251AB6337E7E20D312F9ED66D70EB699A6EC85B1E0BC7F376C0
# emulate old password
update mysql.password_reuse_check_history set time= date_sub(now(), interval
11 day);
alter user user_name@localhost identified by 'test_pwd';
show warnings;
Level	Code	Message
drop user user_name@localhost;
show create table mysql.password_reuse_check_history;
Table	Create Table
password_reuse_check_history	CREATE TABLE `password_reuse_check_history` (
  `hash` binary(64) NOT NULL,
  `time` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`hash`),
  KEY `tm` (`time`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
select count(*) from mysql.password_reuse_check_history;
count(*)
1
drop table mysql.password_reuse_check_history;
set @save_password_reuse_check_interval= @@password_reuse_check_interval;
set global password_reuse_check_interval= @save_password_reuse_check_interval;
uninstall plugin password_reuse_check;