{"id":7943,"date":"2024-06-06T19:59:09","date_gmt":"2024-06-06T14:29:09","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=7943"},"modified":"2024-06-06T20:01:18","modified_gmt":"2024-06-06T14:31:18","slug":"how-to-change-mysql-password-policy-level","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-change-mysql-password-policy-level\/","title":{"rendered":"How to change MySQL password policy level"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Introduction<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL&#8217;s password policy level, defined by the\u00a0&#8220;validate_password_policy&#8221;\u00a0system variable, enforces constraints on new passwords to ensure they are secure<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisites<\/strong><br>1. A sudo privileged user to SSH the server <br>2. Mysql root password<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Implementation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL&#8217;s password policy has three levels: LOW, MEDIUM, and STRONG<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>LOW<\/strong>: Tests password length only, requiring passwords to be at least 8 characters long<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>MEDIUM<\/strong>: Adds the conditions that passwords must contain at least one numeric character, one lowercase character, one uppercase character, and one special (nonalphanumeric) character<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>STRONG<\/strong>: \u00a0At least 12 characters long but 14 or more is better. A combination of uppercase letters, lowercase letters, numbers, and symbols. Not a word that can be found in a dictionary or the name of a person, character, product, or organization<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1<\/strong>: SSH the server where the MySQL password policy level needs to change<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ ssh username@IP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2<\/strong>: Log in to the Mysql with root access<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ mysql -u root -p<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3<\/strong>: Execute query to check the current setting of &#8220;validate_password&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&gt; &gt; <code>SHOW VARIABLES LIKE<\/code> <code>'validate_password%';<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.02.45-PM.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"397\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.02.45-PM-1024x397.png\" alt=\"\" class=\"wp-image-7944\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.02.45-PM-1024x397.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.02.45-PM-300x116.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.02.45-PM-768x298.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.02.45-PM-773x300.png 773w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.02.45-PM.png 1046w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4<\/strong>: Execute the below query to change the password policy from Medium to Low<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&gt; &gt; <code>SET<\/code> <code>GLOBAL<\/code> <code>validate_password_policy=LOW;<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.06.02-PM.png\"><img decoding=\"async\" width=\"942\" height=\"92\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.06.02-PM.png\" alt=\"\" class=\"wp-image-7945\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.06.02-PM.png 942w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.06.02-PM-300x29.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.06.02-PM-768x75.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/06\/Screen-Shot-2024-06-04-at-9.06.02-PM-850x83.png 850w\" sizes=\"(max-width: 942px) 100vw, 942px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 5<\/strong>: Restart the MySQL service<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ systemctl restart mysql<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction MySQL&#8217;s password policy level, defined by the\u00a0&#8220;validate_password_policy&#8221;\u00a0system variable, enforces constraints on new passwords to ensure they are secure Prerequisites1. [&hellip;]<\/p>\n","protected":false},"author":495,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","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":"","ast-disable-related-posts":"","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":"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":"","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-4)","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-4)","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-4)","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":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[986],"class_list":["post-7943","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-mysql-password-policy-level","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-247","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/495"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7943"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7943\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}