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

时间:2016-07-07 22:25:03

标签: mysql ubuntu phpmyadmin

我目前在我的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

相同

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      |
+--------------------------------------+--------+

2 个答案:

答案 0 :(得分:8)

这是Validate Password Plugin正在发挥作用。它是在MySQL 5.6.6中引入的。

根据SHOW VARIABLES LIKE 'validate_password%';返回的值,您在validate_password_special_char_count | 1所示的密码中遗漏了一个特殊字符。

在此密码$中添加*yIO8v3hVai0zosaD等特殊字符,以便您能够创建用户。

答案 1 :(得分:1)

程序1:

步骤1:使用root用户和密码登录

步骤2:在Sql终端中运行bellow命令

INSTALL PLUGIN validate_password SONAME 'validate_password.so';

步骤3:使用您想要的任何密码创建新用户

步骤4:在Sql终端中运行bellow命令

import {ViewChildren,QueryList} from '@angular/core';
    @ViewChildren('imageUpload') imageUploads: QueryList<ImageUploadComponent>;

    uploadImage(index) {
      console.log('index', index);
      this.imageUploads.find((imgUpld,i)=>{
          return index == i;
      }).showImageBrowseDlg();
    }

第5步:立即结帐用户名&amp;登录密码

程序2:

在此密码中添加一个特殊字符,例如$或*,其他情况包括数字,小写字母,超大小写字符