By snakespan
Hi,
I’ve been following this tutorial to install Wordpress - https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-16-04#step-1-create-a-mysql-database-and-user-for-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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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).
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:
E2M5Yk75rOD2P2G6zIECIYLPvcdJj1BcQWM9W2tRUpjBCIPBypebhTc0bLcOQbe
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 https://www.grc.com/passwords.htm.
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;
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.