老师我使用修改密码策略,修改密码时输入当前密码没生效
set persist password_require_current=on;
切换到用户lijunyao1205;执行指令:
alter user 'lijunyao1205'@'%' identified by 'lijunyao1205@12345';
修改成功的,并没有提示输入当前密码;
我看了下变量:
mysql8.0>show variables like 'password%';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| password_history | 3 |
| password_require_current | ON |
| password_reuse_interval | 0 |
+--------------------------+-------+
mysql8.0>select user , password_require_current from mysql.user
-> ;
+------------------+--------------------------+
| user | password_require_current |
+------------------+--------------------------+
| lijunyao1205 | NULL |
| mysql.infoschema | NULL |
| mysql.session | NULL |
| mysql.sys | NULL |
| root | NULL |
+------------------+--------------------------+
没看出哪里有问题呢,全局的设置,按理是不是要生效了呢;