报这个错的原因是从mysql5.7之后加强了密码规则。
查看password的规则:
show VARIABLES like '%password_policy%'
本地测试,使用简单密码:
set global validate_password.policy=0
Policy | Tests Performed |
---|---|
0 | or LOW Length |
1 | or MEDIUM Length; numeric, lowercase/uppercase, and special characters |
2 | or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file |
查看password的长度:
show VARIABLES like '%validate_password_length%'
完整:
show VARIABLES like '%validate_password%'
set global validate_password.policy=0;
set global validate_password.length=3;
create user 'supports_manager'@'%' identified WITH mysql_native_password by '13232';
grant all privileges on *.* to supports_manager@'%';
flush privileges;