- navicat连接报错:1045
- 解决方法:给用户授权
我这里事给所有用户授权
mysql> grant all privileges on *.* TO '用户'@'%' identified by '密码';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- 这里大致是说你设置的密码太简单了,不符合密码策略
查看下mysql策略:
mysql> show variables like "%validate%";
- 降低密码复杂度:
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
- 然后再次授权
mysql> grant all privileges on *.* TO '用户'@'%' identified by '密码';
显示Query OK就代表成功了
刷新:
mysql> flush privileges;
- 再次尝试登录成功: