For others who may face this error in future and not yet find a solution yet, below is the solution worked for me, its mostly due to SELINUX if you are in Cent OS 7 or RHEL 7 or whatever version with SELINUX enabled:
-- if we get password policy not met error and error or warning says:
Warning message:
+---------+------+----------------------------------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------------------------------+
| Warning | 1819 | cracklib: error loading dictionary |
| Error | 1819 | Your password does not satisfy the current policy requirements |
+---------+------+----------------------------------------------------------------+
Then this is due to SELinux issue. We have to set the context to grant access to cracklib dir.
Description When using default settings cracklib tries to read the password database from /usr/share/cracklib/. When using the standard SELINUX profile mysqdl doesn't have access to that directory though.
You can use SHOW VARIABLES WHERE Variable_Name LIKE "%dir" to get the cracklib dir name.
Workarounds:
* add additional access rules:
{code:bash}
semanage fcontext -a -t mysqld_etc_t "/usr/share/cracklib(/.*)?"
restorecon -Rv /usr/share/cracklib
{code}
* or copy cracklib dictionary to mysqld datadir and set cracklib_password_check_dictionary accordingly