一、密码管理
--修改root用户密码
alter user user() identified by 'ccj';
--修改普通用户密码
alter user 'ccj'@'localhost' identified by 'ccj';
--随机密码
create user 'ccj2'@'localhost' identified by random password;
alter user 'ccj'@'localhost' identified by random password;
--强制使用强密码
install component 'file://component_validate_password';
--查看密码相关的参数
show global variables like 'validate_password%';
--设置连续输错次数限制 连续错误3次,锁定数据库3天
create user 'test_err_num'@'localhost' identified by 'Password0123!' failed_login_attempts 3 password_lock_time 3;