element11
element11

Reputation: 4475

mySQL password policy refuses all attempts to create user

My current installation of mySQL/phpMyAdmin on my ubuntu server is refusing to allow any user to be created with any password I have tried. The error is always:

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

I have never had this error before with other installations of mysql, on server and xampp/localhost both. This is a new server installation however.

For example, on the mysql terminal on the command line, any attempt to create a user (with extremely random passwords) fails

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

Same thing with phpMyAdmin

enter image description here

enter image description here

With the following error at the bottom

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,
)

Edit: Added results for the mysql validate_password% variables

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

Upvotes: 8

Views: 19708

Answers (2)

ipsm
ipsm

Reputation: 51

Procedure 1:

Step1: Log in with root user ane and password

Step2: run bellow command in Sql terminal

 uninstall plugin validate_password 

Step3 : create a new user with whatever password you want

Step4: run bellow command in Sql terminal

INSTALL PLUGIN validate_password SONAME 'validate_password.so';

Step5: Checkout now your username & password by login

Procedure 2:

Add a special character such as $ or * to this password icluding other cases like digit,small case character, uper case character

Upvotes: 5

Michael Hommé
Michael Hommé

Reputation: 1726

This is the Validate Password Plugin at work. It was introduced in MySQL 5.6.6.

According to the values returned from the SHOW VARIABLES LIKE 'validate_password%'; you're missing a single special character in your password as indicated by validate_password_special_char_count | 1.

Add a special character such as $ or * to this password yIO8v3hVai0zosaD you'll be able to create the user.

Upvotes: 13

Related Questions