{"id":2736,"date":"2020-11-14T17:23:51","date_gmt":"2020-11-14T09:23:51","guid":{"rendered":"https:\/\/jir.idv.tw\/wordpress\/?p=2736"},"modified":"2020-11-14T17:24:42","modified_gmt":"2020-11-14T09:24:42","slug":"mysql%e8%8b%a5%e4%bf%ae%e6%94%b9%e5%af%86%e7%a2%bc%e8%b7%b3your-password-does-not-satisfy-the-current-policy-requirements","status":"publish","type":"post","link":"https:\/\/jir.idv.tw\/wordpress\/?p=2736","title":{"rendered":"MySQL\u82e5\u4fee\u6539\u5bc6\u78bc\u8df3Your password does not satisfy the current policy requirements"},"content":{"rendered":"<p>\u505a\u500b\u7b46\u8a18\u8a18\u9304\uff0c\u5982\u679cMYSQL\u6539\u5bc6\u78bc\u8df3\u51fa\u8a2d\u5b9a\u4e0d\u7b26\u5408\u898f\u7bc4\u7684\u653f\u7b56\u6642\u3002<\/p>\n<p>\u767b\u5165\u9032\u53bbMYSQL\u6307\u4ee4\u756b\u9762\uff0c\u78ba\u8a8d\u76ee\u524d\u8a2d\u5b9a\u65b9\u6848\uff1a<br \/>\nmysql -u \u767b\u5165\u5e33\u865f<br \/>\n\u8f38\u5165\u5bc6\u78bc<br \/>\n> show variables like &#8216;%password%&#8217;;<br \/>\n\u6703\u5217\u51fa\u985e\u4f3c\u9019\u6a23:<!--more--><br \/>\n<code>+----------------------------------------------+-----------------+<br \/>\n| Variable_name                                | Value           |<br \/>\n+----------------------------------------------+-----------------+<br \/>\n| caching_sha2_password_auto_generate_rsa_keys | ON              |<br \/>\n| caching_sha2_password_private_key_path       | private_key.pem |<br \/>\n| caching_sha2_password_public_key_path        | public_key.pem  |<br \/>\n| default_password_lifetime                    | 0               |<br \/>\n| disconnect_on_expired_password               | ON              |<br \/>\n| mysql_native_password_proxy_users            | OFF             |<br \/>\n| password_history                             | 0               |<br \/>\n| password_require_current                     | OFF             |<br \/>\n| password_reuse_interval                      | 0               |<br \/>\n| report_password                              |                 |<br \/>\n| sha256_password_auto_generate_rsa_keys       | ON              |<br \/>\n| sha256_password_private_key_path             | private_key.pem |<br \/>\n| sha256_password_proxy_users                  | OFF             |<br \/>\n| sha256_password_public_key_path              | public_key.pem  |<br \/>\n| validate_password.check_user_name            | ON              |<br \/>\n| validate_password.dictionary_file            |                 |<br \/>\n| validate_password.length                     | 8               | <== 8\u500b\u5b57\u5143\n| validate_password.mixed_case_count           | 1               | <== \u5927\u5c0f\u5beb\u5b57\u5143\u6578\n| validate_password.number_count               | 1               | <== \u6578\u5b57\u6578\n| validate_password.policy                     | MEDIUM          | <== \u5f37\u5ea6\u653f\u7b56\n| validate_password.special_char_count         | 1               | <== \u7279\u6b8a\u5b57\u5143\u6578\n+----------------------------------------------+-----------------+<\/code><br \/>\n\u91cd\u9ede\u5c31\u9019\u500b\u9020\u6210\u7121\u6cd5\u66f4\u63db\u5bc6\u78bc\u6216\u662f\u5efa\u7acb\u5bc6\u78bc\u7684\u5143\u51f6\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u5011\u53ef\u4ee5\u5148\u964d\u4f4e\u5bc6\u78bc\u8b8a\u5316\u96e3\u5ea6\uff0c\u518d\u6062\u5fa9(\u6216\u8005\u5c31\u4fdd\u6301)\u3002<br \/>\n\u7bc4\u4f8b\uff0c\u5f37\u5ea6\u653f\u7b56\u6539\u6210LOW\u3001\u5b57\u5143\u6578\u6539\u62104\u500b\u3001\u7279\u6b8a\u5b57\u5143\u6578\u6539\u6210\u4e0d\u9700\u8981\u3002<br \/>\n> set global validate_password.policy=0;<br \/>\n> set global validate_password.length=4;<br \/>\n> set global validate_password.special_char_count =0;<\/p>\n<p>\u8abf\u6574\u5f8c\u898f\u5247\u518d\u78ba\u8a8d\u4e00\u6b21\u3002<br \/>\n> show variables like '%password%';<br \/>\n<code>+----------------------------------------------+-----------------+<br \/>\n| Variable_name                                | Value           |<br \/>\n+----------------------------------------------+-----------------+<br \/>\n...<br \/>\n| validate_password.length                     | 4               |<br \/>\n| validate_password.mixed_case_count           | 1               |<br \/>\n| validate_password.number_count               | 1               |<br \/>\n| validate_password.policy                     | LOW             |<br \/>\n| validate_password.special_char_count         | 0               |<br \/>\n+----------------------------------------------+-----------------+<\/code><\/p>\n<p>\u8abf\u6574\u5f8c\uff0c\u5c31\u53ef\u4ee5\u6539\u4e00\u500b\u767b\u5165\u8005\u5e33\u865f\u7684\u5bc6\u78bc\u770b\u770b\u3002<br \/>\n> use mysql;<br \/>\nDatabase changed<br \/>\n> ALTER USER '\u767b\u5165\u5e33\u865f\u540d'@'localhost' identified BY '\u5bc6\u78bc\u8f38\u5165\u5728\u9019';<br \/>\nQuery OK, 0 rows affected (0.02 sec) <strong><== \u5982\u679c\u6709\u8df3\u9019\u500b\u8a0a\u606f\u5c31\u4ee3\u8868\u4fee\u6539\u6210\u529f\u3002<\/strong><\/p>\n<p>\u5176\u4ed6\u53c3\u8003\uff1a<br \/>\n<a href=\"https:\/\/www.itread01.com\/content\/1549661438.html\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/www.itread01.com\/content\/1549661438.html<\/a><br \/>\n<a href=\"http:\/\/n.sfs.tw\/content\/index\/13359?noframe=true\" rel=\"noopener noreferrer\" target=\"_blank\">http:\/\/n.sfs.tw\/content\/index\/13359?noframe=true<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u505a\u500b\u7b46\u8a18\u8a18\u9304\uff0c\u5982\u679cMYSQL\u6539\u5bc6\u78bc\u8df3\u51fa\u8a2d\u5b9a\u4e0d\u7b26\u5408\u898f\u7bc4\u7684\u653f\u7b56\u6642\u3002 \u767b\u5165\u9032\u53bbMYSQL\u6307\u4ee4\u756b\u9762\uff0c\u78ba\u8a8d\u76ee\u524d\u8a2d\u5b9a\u65b9\u6848\uff1a mysql -u \u767b\u5165\u5e33\u865f \u8f38\u5165\u5bc6\u78bc > show variables like &#8216;%password%&#8217;; \u6703\u5217\u51fa\u985e\u4f3c\u9019\u6a23:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2736","post","type-post","status-publish","format-standard","hentry","category-4","content-layout-excerpt-thumb"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2736"}],"version-history":[{"count":2,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2736\/revisions"}],"predecessor-version":[{"id":2738,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2736\/revisions\/2738"}],"wp:attachment":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}