问题描述:mysql在新建用户时报错ERROR 1819,如下所示:
数据库:mysql 5.7.42
系统:rhel 7.3
1、问题重现
mysql> grant replication slave,replication client on *.* to 'slave'@'192.168.133.91' identified by "slave@12345";
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.42-log |
+------------+
1 row in set (0.00 sec)
2、异常原因
该报错与MySQL密码安全策略validate_password_policy的值有关,validate_password_policy可以取0、1、2三个值.
3、解决方案
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
mysql> grant replication slave,replication client on *.* to 'slave'@'192.168.133.91' identified by "slave@12345";
Query OK, 0 rows affected, 1 warning (0.00 sec)
标签:slave,0.00,mysql,1819,sec,ERROR,policy,password
From: https://blog.51cto.com/u_12991611/6605743