Unable to create user in SQL

Posted January 10, 2017 13.4k views
MySQLWordPressUbuntu 16.04


I’ve been following this tutorial to install Wordpress -

but this command seems to fail:
GRANT ALL ON wordpress.* TO ‘wordpressuser’@'localhost’ IDENTIFIED BY 'password’;

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

I’ve tried a suggestion below with the following commands instead:
mysql> CREATE USER 'wordpressuser’;
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> ALTER USER 'wordpressuser’@'localhost’ IDENTIFIED BY 'password’;
ERROR 1396 (HY000): Operation ALTER USER failed for 'wordpressuser’@'localhost’

but those failed as well.

Any ideas?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

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

Means that your password is not satisfying strength you selected on set up. I can assume that you followed LAMP tutorial before WordPress one.
Important part is Install MySQL - VALIDATE PASSWORD PLUGIN.
There you were asked for to validate password strength when creating new user or changing for existing user.

Policies are following:

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1

If you selected 0 (LOW) on installation, try with password with at least 8 chars. For 1 (MEDIUM) passwords needs to be at least 8 chars long with letters (mixed case), numbers and special characters. For 2 (STRONG), 1 (MEDIUM) applies + dictionary check (you can’t use common words).

by Brennen Bearnes
A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is...


When MySQL was installed, the password strength plugin was most likely enabled and thus, weak passwords that do not pass the set policy will not be permitted for use.

For example, using a password such as xyz1234 won’t pass, but a password, such as the one shown below, should pass without issue:


That’s not to say you need to use a password that long, it is, however, ideal. Given the technology and short amount of time it takes to crack short, non-random passwords, you should always use randomly generated passwords from a good source of entropy.

One good source is

The correct all-on-one command is indeed:

grant all on example_db.* to 'example_user'@'localhost' identified by 'strong_password';

… but you need to use a stronger, more secure password in combination with the command, else it’s going to fail.

You can, of course, uninstall the plugin using the command below (while logged in to the MySQL CLI), but instead, I’d simply recommend using a stronger password.

uninstall plugin validate_password;