mySQL 密码策略拒绝所有创建用户的尝试
mySQL password policy refuses all attempts to create user
我当前在 ubuntu 服务器上安装的 mySQL/phpMyAdmin 拒绝允许使用我试过的任何密码创建任何用户。错误总是:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
我以前从未在服务器和 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 相同
底部有如下错误
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
您将能够创建用户。
程序一:
第一步:使用root用户名和密码登录
第 2 步:运行 在 Sql 终端中输入以下命令
uninstall plugin validate_password
第 3 步:使用您想要的任何密码创建一个新用户
第 4 步:运行 在 Sql 终端中输入以下命令
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
第 5 步:现在通过登录检查您的用户名和密码
程序二:
在此密码中添加一个特殊字符,例如 $ 或 *,包括其他大小写,例如数字、小写字符、大写字符
我当前在 ubuntu 服务器上安装的 mySQL/phpMyAdmin 拒绝允许使用我试过的任何密码创建任何用户。错误总是:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
我以前从未在服务器和 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 相同
底部有如下错误
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
您将能够创建用户。
程序一:
第一步:使用root用户名和密码登录
第 2 步:运行 在 Sql 终端中输入以下命令
uninstall plugin validate_password
第 3 步:使用您想要的任何密码创建一个新用户
第 4 步:运行 在 Sql 终端中输入以下命令
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
第 5 步:现在通过登录检查您的用户名和密码
程序二:
在此密码中添加一个特殊字符,例如 $ 或 *,包括其他大小写,例如数字、小写字符、大写字符