gpt4 book ai didi

mySQL 密码策略拒绝所有创建用户的尝试

转载 作者:可可西里 更新时间:2023-11-01 06:59:57 25 4
gpt4 key购买 nike

我当前在我的 ubuntu 服务器上安装的 mySQL/phpMyAdmin 拒绝允许使用我尝试过的任何密码创建任何用户。错误总是:

ERROR 1819 (HY000):您的密码不符合当前政策要求

我以前从未在服务器和 xampp/localhost 上安装其他 mysql 时遇到过此错误。然而,这是一个新的服务器安装。

例如,在命令行的 mysql 终端上,任何创建用户(使用极其随机的密码)的尝试都会失败

mysql> CREATE USER 'ses'@'%' IDENTIFIED BY 'yIO8v3hVai0zosaD';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> CREATE USER 'ses'@'%' IDENTIFIED BY 'yIO8v3hVai0zosaDyIO8v3hVai0zosaDyIO8v3hVai0zosaD';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

与 phpMyAdmin 相同

enter image description here

enter image description here

底部有如下错误

Warning in ./libraries/dbi/DBIMysqli.class.php#261
mysqli_query(): (HY000/1819): Your password does not satisfy the current policy requirements

Backtrace

./libraries/dbi/DBIMysqli.class.php#261: mysqli_query(
object,
string 'SELECT PASSWORD(\'rSxYcnCcO2fhhKgD\') AS `password`;',
integer 0,
)
./libraries/DatabaseInterface.class.php#244: PMA_DBI_Mysqli->realQuery(
string 'SELECT PASSWORD(\'rSxYcnCcO2fhhKgD\') AS `password`;',
object,
integer 1,
)
./libraries/DatabaseInterface.class.php#1944: PMA_DatabaseInterface->tryQuery(
string 'SELECT PASSWORD(\'rSxYcnCcO2fhhKgD\') AS `password`;',
object,
integer 1,
boolean false,
)
./libraries/server_privileges.lib.php#5055: PMA_DatabaseInterface->fetchSingleRow(string 'SELECT PASSWORD(\'rSxYcnCcO2fhhKgD\') AS `password`;')
./libraries/server_privileges.lib.php#5179: PMA_getHashedPassword(string 'rSxYcnCcO2fhhKgD')
./libraries/server_privileges.lib.php#4176: PMA_getSqlQueriesForDisplayAndAddUser(
string 'test-accountdb',
string '%',
string '',
)
./server_privileges.php#167: PMA_addUser(
NULL,
string 'test-accountdb',
string '%',
NULL,
boolean true,
)

编辑:添加了 mysql validate_password% 变量的结果

mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name | Value |
+--------------------------------------+--------+
| 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 |
+--------------------------------------+--------+

最佳答案

这是 Validate Password Plugin在工作。它是在 MySQL 5.6.6 中引入的。

根据 SHOW VARIABLES LIKE 'validate_password%'; 返回的值,您的密码中缺少一个特殊字符,如 validate_password_special_char_count | 所示1

向此密码添加一个特殊字符,如 $* yIO8v3hVai0zosaD 您将能够创建用户。

关于mySQL 密码策略拒绝所有创建用户的尝试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38256226/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com