Comments on: How to Change MySQL Password Policy Level https://tecadmin.net/change-mysql-password-policy-level/ How to guide for System Administrator's and Developers Thu, 10 Feb 2022 20:52:04 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Andrew https://tecadmin.net/change-mysql-password-policy-level/#comment-63776 Thu, 10 Feb 2022 20:52:04 +0000 https://tecadmin.net/?p=16893#comment-63776 i noticed some changes
SET GLOBAL validate_password_policy=LOW; //instead of validate_password.policy for mysql 5.7*

]]>
By: Rahul https://tecadmin.net/change-mysql-password-policy-level/#comment-63708 Tue, 11 Jan 2022 02:10:49 +0000 https://tecadmin.net/?p=16893#comment-63708 Thanks Frank, Required update done

]]>
By: Frank Balbier https://tecadmin.net/change-mysql-password-policy-level/#comment-63705 Fri, 07 Jan 2022 16:17:58 +0000 https://tecadmin.net/?p=16893#comment-63705 Please correct :
validate_password_policy -> wrong
validate_password.policy -> right

]]>
By: Johnny https://tecadmin.net/change-mysql-password-policy-level/#comment-62885 Sat, 15 May 2021 21:10:06 +0000 https://tecadmin.net/?p=16893#comment-62885 Adding

[mysqld]
validate_password_policy=2

(or 0 for LOW) to my /etc/mysql/my.cnf file, or to my /etc/mysql/mysql.conf.d/mysql.cnf file alone did not work for me. When restarting mysql, I kept getting “Job for mysql.service failed because the control process exited with error code.” error. Then I added the plugin line (below) and restarted mysql, and it worked – my password policy changed on mysql startup. I got the idea from this bug report: https://bugs.mysql.com/bug.php?id=93959 and it worked for me. Hopefully this will help someone, before you pull out all your hair:

Add to /etc/mysql/my.cnf
[mysqld]
plugin-load-add=validate_password.so
validate_password_policy=2

Then, on the Linux command line, type and execute:
sudo service mysql restart

and (hopefully) mysql will start without error. Verify your password policy by running this command in the mysql command line (with root access):
SHOW VARIABLES LIKE ‘validate_password%’;

and hopefully you will see validate_password_policy STRONG (or LOW, or whatever you have set in my.cnf) in the result set.

]]>
By: Maxwell Rayce https://tecadmin.net/change-mysql-password-policy-level/#comment-60158 Mon, 22 Feb 2021 14:49:06 +0000 https://tecadmin.net/?p=16893#comment-60158 Life saver. Thanks man

]]>
By: anon https://tecadmin.net/change-mysql-password-policy-level/#comment-57383 Sun, 03 Jan 2021 09:05:48 +0000 https://tecadmin.net/?p=16893#comment-57383 The variable names changes between mysql5.6 and mysql8.0, see

https://dev.mysql.com/doc/refman/8.0/en/validate-password-transitioning.html

]]>
By: David https://tecadmin.net/change-mysql-password-policy-level/#comment-50603 Mon, 25 May 2020 22:18:37 +0000 https://tecadmin.net/?p=16893#comment-50603 Thank you Frank. You saved my time and effort on this issue

]]>
By: Gabriel Vila Real https://tecadmin.net/change-mysql-password-policy-level/#comment-50593 Mon, 25 May 2020 19:42:42 +0000 https://tecadmin.net/?p=16893#comment-50593 Thank you for this useful tip!
I used to have the root user with a blank password on my development environment. I need to set the full set of validation variables password on mysqld.cnf to it works again. On mysqld.cnf now I have:

validate_password.check_user_name=OFF
validate_password.dictionary_file=
validate_password.length=0
validate_password.mixed_case_count=0
validate_password.number_count=0
validate_password.policy=LOW
validate_password.special_char_count=0

]]>
By: hicall https://tecadmin.net/change-mysql-password-policy-level/#comment-44262 Mon, 30 Dec 2019 10:29:19 +0000 https://tecadmin.net/?p=16893#comment-44262 thanks brow, work it on mysql v8

]]>
By: Frank https://tecadmin.net/change-mysql-password-policy-level/#comment-44164 Fri, 20 Dec 2019 23:30:20 +0000 https://tecadmin.net/?p=16893#comment-44164 Hi there,
thanks for direction, there is a typo, you have:
mysql> SET GLOBAL validate_password_policy=LOW;
it should be:
mysql> SET GLOBAL validate_password.policy=LOW;
(as visible from command:)
SHOW VARIABLES LIKE ‘validate_password%’;

All the best,

]]>