建立xtrbackup備份使用者 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

刚好遇见Mysql發表於2024-08-02

檢視密碼策略

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@'%';

  

相關文章