Changing your MySQL password validation level

Posted under » MySQL » Ubuntu on 16 Aug 2018

This has never been an issue for me until I migrated to Ubuntu 18.04 bionic. With much reference to this MySQL docu.

First login to mysql as root. Then

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

You will see the password length is 8 and some other secure stuff. So you must make life easier for you like

mysql> SET GLOBAL validate_password_number_count = 3;
or
SET GLOBAL validate_password_policy=LOW;

Check variables again and then try setting password again eg.

mysql> CREATE USER 'anoneh'@'localhost' IDENTIFIED BY 'LKYbassssstard';

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css