mysql8.0 设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

【起因】

有时候只是因为内网访问使用测试服务器,不想设置复杂的密码,比如root:123456
但是新版 mysql 加入密码安全度检测机制,导致报错
解决方法如下

1.查看当前安全变量值

mysql> SHOW VARIABLES LIKE 'validate_password%';