Mysql 5.7.x password policy lavel change



I installed ubuntu 18.04 and installed LAMP stack on it. When i created database there was no problem but when i tried to grant privileges to a db user, i got warning and did not succeed with query.

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

So here is the solution for you -

From mysql version 5.7.x to above default global password validity variable
validate_password_policy  is medium and hence this was happens .
So i changed the level to low.


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      |
+--------------------------------------+--------+
6 rows in set (0.01 sec)

so we can change it in two ways one is with global variable set query

mysql> SET GLOBAL validate_password_policy=LOW;
Query OK, 0 rows affected (0.00 sec)

This can be done  with my.cnf file also. add bellow line in mysql config file and  restart mysql service

[mysqld]
validate_password_policy=LOW

Comments

Popular posts from this blog

Running web ssh client on port 443 /80 with nginx as reverse proxy

Running cockpit behind nginx reverse proxy with nginx ssl and cockpit non ssl

Setup VOD streaming server with nginx using RTMP on Ubuntu 18.04