{"id":4956,"date":"2021-10-20T10:54:54","date_gmt":"2021-10-20T01:54:54","guid":{"rendered":"\/blog\/?p=4956"},"modified":"2023-09-21T09:26:28","modified_gmt":"2023-09-21T00:26:28","slug":"mysql-%ed%8c%a8%ec%8a%a4%ec%9b%8c%eb%93%9c-%eb%b3%b4%ec%95%88-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=4956","title":{"rendered":"[MySQL] \ud328\uc2a4\uc6cc\ub4dc \ubcf4\uc548 \uc124\uc815"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">1. \uacc4\uc815 \ud328\uc2a4\uc6cc\ub4dc \uc720\ud6a8\uae30\ud55c \uc124\uc815 (Password Expiration Policy)\r\n[mysqld]\r\n# \uacc4\uc815 \uc0dd\uc131 \uc2dc \ubd80\uc5ec\ub418\ub294 password_lifetime\uc744 90\uc77c\ub85c \uc124\uc815 (0\uc774\uba74 \ubb34\uc81c\ud55c)\r\n# MySQL \uc804\uc6a9 \uc635\uc158\uc774\ub2e4. MariaDB\ub294 10.4 \uc774\uc0c1\ubd80\ud130 \uc801\uc6a9\ub41c\ub2e4.\r\ndefault_password_lifetime=90\r\n\r\n\ub610\ub294 mysql shell\uc5d0\uc11c\r\nSET GLOBAL default_password_lifetime=90;\r\n\r\n\u25ce\uacc4\uc815 \ubcc4\ub85c \uc124\uc815\ud558\ub294 \ubc29\ubc95 (\uc2e0\uaddc \uacc4\uc815)\r\nCREATE USER 'testuser'@'localhMost' PASSWORD EXPIRE DEFAULT;\r\nCREATE USER 'testuser'@'localhost' PASSWORD EXPIRE INTERVAL 90 DAY;\r\nCREATE USER 'testuser'@'localhost' PASSWORD EXPIRE NEVER;\r\n\r\n\u25ce\uacc4\uc815 \ubcc4\ub85c \uc124\uc815\ud558\ub294 \ubc29\ubc95 (\uae30\uc874 \uacc4\uc815)\r\nALTER USER 'testuser'@'localhost' PASSWORD EXPIRE DEFAULT;\r\nALTER USER 'testuser'@'localhost' PASSWORD EXPIRE INTERVAL 90 DAY;\r\nALTER USER 'testuser'@'localhost' PASSWORD EXPIRE NEVER;\r\n\r\n2. \uacc4\uc815 \ud328\uc2a4\uc6cc\ub4dc \ubcf5\uc7a1\ub3c4 \uc124\uc815 (Password Validation)\r\n[mysqld]\r\nplugin-load-add=validate_password.so\r\n# FORCE_PLUS_PERMANENT\ub294 \uc2dc\uc791 \uc2dc \ud50c\ub7ec\uadf8\uc778\uc744 \ub85c\ub4dc\ud558\uace0 \uc11c\ubc84\uac00 \uc2e4\ud589\ub418\ub294 \ub3d9\uc548 \uc81c\uac70\ub418\uc9c0 \uc54a\ub294\ub2e4.\r\nvalidate-password=FORCE_PLUS_PERMANENT\r\nvalidate_password_policy=MEDIUM\r\nvalidate_password_check_user_name=OFF\r\nvalidate_password_length=8\r\nvalidate_password_mixed_case_count=0\r\nvalidate_password_number_count=1\r\nvalidate_password_policy=MEDIUM\r\nvalidate_password_special_char_count=1<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. \uacc4\uc815 \ud328\uc2a4\uc6cc\ub4dc \uc720\ud6a8\uae30\ud55c \uc124\uc815 (Password Expiration Policy) [mysqld] # \uacc4\uc815 \uc0dd\uc131 \uc2dc \ubd80\uc5ec\ub418\ub294 password_lifetime\uc744 90\uc77c\ub85c \uc124\uc815 (0\uc774\uba74 \ubb34\uc81c\ud55c) # MySQL \uc804\uc6a9 \uc635\uc158\uc774\ub2e4. MariaDB\ub294 10.4 \uc774\uc0c1\ubd80\ud130 \uc801\uc6a9\ub41c\ub2e4. default_password_lifetime=90 \ub610\ub294 mysql shell\uc5d0\uc11c SET GLOBAL default_password_lifetime=90; \u25ce\uacc4\uc815 \ubcc4\ub85c \uc124\uc815\ud558\ub294 \ubc29\ubc95 (\uc2e0\uaddc \uacc4\uc815) CREATE USER &#8216;testuser&#8217;@&#8217;localhMost&#8217; PASSWORD EXPIRE DEFAULT; CREATE USER &#8216;testuser&#8217;@&#8217;localhost&#8217; PASSWORD EXPIRE INTERVAL 90 DAY; CREATE [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[10],"tags":[],"class_list":["post-4956","post","type-post","status-publish","format-standard","hentry","category-computing_database"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4956"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4956\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}