创建xtrbackup备份用户 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

查看密码策略

mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password_check_user_name    | ON     |
| validate_password_dictionary_file    |        |
| validate_password_length             | 8      |
| validate_password_mixed_case_count   | 1      |
| validate_password_number_count       | 1      |
| validate_password_policy             | MEDIUM |
| validate_password_special_char_count | 1      |
+--------------------------------------+--------+
7 rows in set (0.01 sec)

  修改策略

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> create user 'bk'@'%' IDENTIFIED by 'ocm123';
Query OK, 0 rows affected (0.01 sec)
授权
mysql> grant RELOAD,LOCK TABLES,REPLICATION CLIENT,PROCESS,SUPER,CREATE,INSERT,SELECT on *.* to bk@'%';
Query OK, 0 rows affected, 1 warning (0.01 sec)
查看权限
mysql> show grants for bk@'%';
+----------------------------------------------------------------------------------------------------------+
| Grants for bk@%                                                                                          |
+----------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, CREATE, RELOAD, PROCESS, SUPER, LOCK TABLES, REPLICATION CLIENT ON *.* TO `bk`@`%` |
+----------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
简单粗暴点
grant all on *.* to bk@'%';

  

posted @ 2024-08-02 08:49  刚好遇见Mysql  阅读(5)  评论(0编辑  收藏  举报