I am trying to change the password policy requirements in MYSQL8 (Note not MYSQL 5.7). I am using Ubuntu 20.04 server (so no GUI).
I can change them within mysql-8 by using lines such as SET GLOBAL validate_password.policy=LOW;
and I can see the changes using SHOW VARIABLES LIKE 'validate_password%';
, however when I restart mysql using service mysql restart
they return the their default settings.
The Stack Overflow article 36301100 alludes to adding lines to mysqld.cnf file however there is no mysqld.cnf file just the mysql.cnf file under the /etc/mysql/ directory. When I add any lines such as SET GLOBAL validate_password.policy=LOW;
it causes the mysql server to fail after the service mysql restart
command.
Another suggestion given is to remove the password plugin with UNINSTALL COMPONENT 'file://component_validate_password';
, however this strikes me as a bit harsh.
Any suggestions? Thanks, Greg
Copyright Notice:Content Author:「Greg」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/67646088/mysql8-permanently-change-password-policy-requirements