SELECT PLUGIN_NAME, PLUGIN_STATUS, plugin_library, load_option FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_library = 'validate_password.so'; mysql> show plugins;
1 账号密码过期,需修改密码 遇到场景:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
# 1. 注意密码策略要求 validate_password_policy 等 show variables like 'validate_password%';
# 2. 依据密码策略要求修改密码 /* -- 2.1 如果密码与Server的策略要求不一致时,临时修改策略及密码后恢复密码策略 set global validate_password_policy=0; set global validate_password_length=1; */ alter user 'root'@'localhost' identified by 'root'; /* set global validate_password_policy=1; set global validate_password_length=8; */ flush privileges;
-- 2.2 密码符合要求 alter user 'root'@'localhost' identified by 'R#isn218aio'; flush privileges;