{"id":6412,"date":"2016-12-02T20:39:02","date_gmt":"2016-12-02T12:39:02","guid":{"rendered":"http:\/\/rmohan.com\/?p=6412"},"modified":"2016-12-02T20:39:02","modified_gmt":"2016-12-02T12:39:02","slug":"mysql-error-1819-hy000-your-password-does-not-satisfy-the-current-policy-requirements","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6412","title":{"rendered":"MySQL ERROR 1819 (HY000): Your password does not satisfy the current policy requirements !!"},"content":{"rendered":"<p>First you login with <code>mysql -u root -p<\/code> and check the current policy rules by:<\/p>\n<pre class=\"lang-sql prettyprint prettyprinted\"><code><span class=\"pun\">#<\/span><span class=\"pln\"> SHOW VARIABLES <\/span><span class=\"kwd\">LIKE<\/span> <span class=\"str\">'validate_password%'<\/span><span class=\"pun\">;<\/span>\r\n<span class=\"pun\">+<\/span><span class=\"com\">--------------------------------------+--------+<\/span>\r\n<span class=\"pun\">|<\/span><span class=\"pln\"> Variable_name                        <\/span><span class=\"pun\">|<\/span><span class=\"pln\"> Value  <\/span><span class=\"pun\">|<\/span>\r\n<span class=\"pun\">+<\/span><span class=\"com\">--------------------------------------+--------+<\/span>\r\n<span class=\"pun\">|<\/span><span class=\"pln\"> validate_password_dictionary_file    <\/span><span class=\"pun\">|<\/span>        <span class=\"pun\">|<\/span>\r\n<span class=\"pun\">|<\/span><span class=\"pln\"> validate_password_length             <\/span><span class=\"pun\">|<\/span> <span class=\"lit\">5<\/span>      <span class=\"pun\">|<\/span>\r\n<span class=\"pun\">|<\/span><span class=\"pln\"> validate_password_mixed_case_count   <\/span><span class=\"pun\">|<\/span> <span class=\"lit\">1<\/span>      <span class=\"pun\">|<\/span>\r\n<span class=\"pun\">|<\/span><span class=\"pln\"> validate_password_number_count       <\/span><span class=\"pun\">|<\/span> <span class=\"lit\">1<\/span>      <span class=\"pun\">|<\/span>\r\n<span class=\"pun\">|<\/span><span class=\"pln\"> validate_password_policy             <\/span><span class=\"pun\">|<\/span><span class=\"pln\"> MEDIUM <\/span><span class=\"pun\">|<\/span>\r\n<span class=\"pun\">|<\/span><span class=\"pln\"> validate_password_special_char_count <\/span><span class=\"pun\">|<\/span> <span class=\"lit\">1<\/span>      <span class=\"pun\">|<\/span>\r\n<span class=\"pun\">+<\/span><span class=\"com\">--------------------------------------+--------+<\/span><\/code><\/pre>\n<p>Then you can change any of the above variables at your will:<\/p>\n<pre class=\"lang-sql prettyprint prettyprinted\"><code><span class=\"pun\">#<\/span> <span class=\"kwd\">SET<\/span><span class=\"pln\"> GLOBAL validate_password_length <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">5<\/span><span class=\"pun\">;<\/span>\r\n<span class=\"pun\">#<\/span> <span class=\"kwd\">SET<\/span><span class=\"pln\"> GLOBAL validate_password_number_count <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">0<\/span><span class=\"pun\">;<\/span>\r\n<span class=\"pun\">#<\/span> <span class=\"kwd\">SET<\/span><span class=\"pln\"> GLOBAL validate_password_mixed_case_count <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">0<\/span><span class=\"pun\">;<\/span>\r\n<span class=\"pun\">#<\/span> <span class=\"kwd\">SET<\/span><span class=\"pln\"> GLOBAL validate_password_special_char_count <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">0<\/span><span class=\"pun\">;\r\n\r\n\r\n[root@ ~]# \/usr\/bin\/mysql_secure_installation\r\n\r\nSecuring the MySQL server deployment.\r\n\r\nEnter password for user root:\r\n\r\nThe existing password for the user account root has expired. Please set a new password.\r\n\r\nNew password:\r\n\r\nRe-enter new password:\r\nThe 'validate_password' plugin is installed on the server.\r\nThe subsequent steps will run with the existing configuration\r\nof the plugin.\r\nUsing existing password for root.\r\n\r\nEstimated strength of the password: 100\r\nChange the password for root ? ((Press y|Y for Yes, any other key for No) : y\r\n\r\nNew password:\r\n\r\nRe-enter new password:\r\n\r\nEstimated strength of the password: 100\r\nDo you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y\r\nBy default, a MySQL installation has an anonymous user,\r\nallowing anyone to log into MySQL without having to have\r\na user account created for them. This is intended only for\r\ntesting, and to make the installation go a bit smoother.\r\nYou should remove them before moving into a production\r\nenvironment.\r\n\r\nRemove anonymous users? (Press y|Y for Yes, any other key for No) : y\r\nSuccess.\r\n\r\n\r\nNormally, root should only be allowed to connect from\r\n'localhost'. This ensures that someone cannot guess at\r\nthe root password from the network.\r\n\r\nDisallow root login remotely? (Press y|Y for Yes, any other key for No) : y\r\nSuccess.\r\n\r\nBy default, MySQL comes with a database named 'test' that\r\nanyone can access. This is also intended only for testing,\r\nand should be removed before moving into a production\r\nenvironment.\r\n\r\n\r\nRemove test database and access to it? (Press y|Y for Yes, any other key for No) : y\r\n\u00a0- Dropping test database...\r\nSuccess.\r\n\r\n\u00a0- Removing privileges on test database...\r\nSuccess.\r\n\r\nReloading the privilege tables will ensure that all changes\r\nmade so far will take effect immediately.\r\n\r\nReload privilege tables now? (Press y|Y for Yes, any other key for No) : y\r\nSuccess.\r\n\r\nAll done!\r\n\r\n<\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>First you login with mysql -u root -p and check the current policy rules by:<\/p>\n<p> # SHOW VARIABLES LIKE &#8216;validate_password%&#8217;; +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+ | Variable_name | Value | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+ | validate_password_dictionary_file | | | validate_password_length | 5 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy | MEDIUM | | validate_password_special_char_count | 1 [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6412"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6412"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6412\/revisions"}],"predecessor-version":[{"id":6413,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6412\/revisions\/6413"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}