Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql cannot grant privilege to user, getting error: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

Tags:

mysql

I am in the process of moving a new application to the Production environment which includes a MySQL DB.

While attempting to grant the required privileges using the command:

GRANT ALTER,CREATE ON `MyDB`.`*` to `ThisUser`@`*` ;

I'm getting the error: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements.

and this, while the passwords (of the root user as well as of the ThisUser) fully satisfy the current policy:

  • The length of the passwords are above 8 chars,
  • They include both upper and lower case, as well as digits and special chars (like "!", "@", "$", etc.).

I tried setting the validate_password_policy to LOW but it didn't help either.

Can anyone explain what the issue is and how to resolve it?

Thanks.

like image 350
FDavidov Avatar asked Jun 11 '16 10:06

FDavidov


1 Answers

To solve this problem change validate_password_policy value: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements:

$ mysql -u root -p
mysql> SET GLOBAL validate_password_policy=LOW;

And grant privileges to your user:

mysql> grant all privileges on DB_NAME.* to 'USER_NAME'@'localhost' identified by 'USER_PASS';
mysql> FLUSH PRIVILEGES;
mysql> exit
$ sudo service mysql reload
$ brew services restart mysql
like image 179
Cubiczx Avatar answered Nov 15 '22 17:11

Cubiczx