{"id":11953,"date":"2018-10-29T17:08:29","date_gmt":"2018-10-29T16:08:29","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/"},"modified":"2018-10-29T17:08:29","modified_gmt":"2018-10-29T16:08:29","slug":"password-verification-policy-in-mysql-8-0-13","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/","title":{"rendered":"Password Verification Policy in MySQL 8.0.13"},"content":{"rendered":"<p>The new release 8.0.13 for MySQL is available since last week.<br \/>\nConcerning security, this comes with a new feature already announced: the Password Verification Policy.<br \/>\nLet&#8217;s have a look&#8230;<br \/>\n<!--more--><br \/>\nThis aim of this feature is to secure the attempts to change a password by specifying the old one to be replaced.<br \/>\nIt is turned off by default:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nmysql&gt; show variables like 'password_require_current';\n+--------------------------+-------+\n| Variable_name            | Value |\n+--------------------------+-------+\n| password_require_current | OFF   |\n+--------------------------+-------+\n<\/pre>\n<p>and we can activate it by several ways (as for some other password features):<br \/>\n1. Globally, at the server level:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nmysql&gt; set persist password_require_current='ON';\nmysql&gt; show variables like 'password_require_current';\n+--------------------------+-------+\n| Variable_name            | Value |\n+--------------------------+-------+\n| password_require_current | ON    |\n+--------------------------+-------+\n<\/pre>\n<p>2. On a per-account-basis, and if we want to force the verification of the old password:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nmysql&gt; create user olivier@localhost identified by 'MySQLisPowerful' PASSWORD REQUIRE CURRENT;\n<\/pre>\n<p>3. On a per-account-basis, and if we want to make the verification of the old password optional:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nmysql&gt; create user gregory@localhost identified by 'SecurityIsImportant' PASSWORD REQUIRE CURRENT OPTIONAL;\n<\/pre>\n<p>Suppose that we have activated it at the server level, now let&#8217;s create one user account:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nmysql&gt; create user elisa@localhost identified by 'manager';\n<\/pre>\n<p>If we try to change the password for this user, we can do that without specifying any password:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nmysql&gt; alter user elisa@localhost identified by 'WhatsTheProblem';\n<\/pre>\n<p>Why? Because we are connected as the root account. Actually accounts which have the &#8216;CREATE USER&#8217; or &#8216;UPDATE on mysql.*&#8217; privileges are not affected by this policy.<\/p>\n<p>So if we try to connect as our user &#8216;elisa&#8217; and to change our password:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [8]\">\nmysql&gt; select user();\n+-----------------+\n| user()          |\n+-----------------+\n| elisa@localhost |\n+-----------------+\nmysql&gt; alter user elisa@localhost identified by 'GoodVibes';\nERROR 13226 (HY000): Current password needs to be specified in the REPLACE clause in order to change it.\n<\/pre>\n<p>that is not possible. We can only do that if we specify our old password in the &#8216;ALTER USER&#8217; statement through the &#8216;REPLACE&#8217; clause:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nmysql&gt; alter user elisa@localhost identified by 'GoodVibes' replace 'WhatsTheProblem';\nQuery OK, 0 rows affected (0.12 sec)\n<\/pre>\n<p>Simple, isn&#8217;t it?<br \/>\nAs a best practice in terms of security, I suggest you to activate this functionality in your MySQL environment.<br \/>\nFor other information concerning new security features in MySQL 8.0 check the <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/security.html\" target=\"_blank\" rel=\"noopener noreferrer\">MySQL Documentation<\/a> and come to my session <a href=\"https:\/\/programm.doag.org\/doag\/2018\/#\/scheduledEvent\/566069\" target=\"_blank\" rel=\"noopener noreferrer\">MySQL 8.0 Community: Ready for GDPR?<\/a> at the DOAG.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The new release 8.0.13 for MySQL is available since last week. Concerning security, this comes with a new feature already announced: the Password Verification Policy. Let&#8217;s have a look&#8230;<\/p>\n","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,1316,149],"tags":[],"type_dbi":[],"class_list":["post-11953","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-mysql","category-security"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Password Verification Policy in MySQL 8.0.13 - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Password Verification Policy in MySQL 8.0.13\" \/>\n<meta property=\"og:description\" content=\"The new release 8.0.13 for MySQL is available since last week. Concerning security, this comes with a new feature already announced: the Password Verification Policy. Let&#8217;s have a look&#8230;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-29T16:08:29+00:00\" \/>\n<meta name=\"author\" content=\"Elisa Usai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elisa Usai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/\"},\"author\":{\"name\":\"Elisa Usai\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/ac5847ee8d7bad4196e72660c1377b1f\"},\"headline\":\"Password Verification Policy in MySQL 8.0.13\",\"datePublished\":\"2018-10-29T16:08:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/\"},\"wordCount\":262,\"commentCount\":0,\"articleSection\":[\"Database Administration &amp; Monitoring\",\"MySQL\",\"Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/\",\"name\":\"Password Verification Policy in MySQL 8.0.13 - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2018-10-29T16:08:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/ac5847ee8d7bad4196e72660c1377b1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Password Verification Policy in MySQL 8.0.13\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/ac5847ee8d7bad4196e72660c1377b1f\",\"name\":\"Elisa Usai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/d41c7e94b7e4cd42bdcc5b82003c00562de8da0cf0a1081fbe832d47e3a828ff?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d41c7e94b7e4cd42bdcc5b82003c00562de8da0cf0a1081fbe832d47e3a828ff?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d41c7e94b7e4cd42bdcc5b82003c00562de8da0cf0a1081fbe832d47e3a828ff?s=96&d=mm&r=g\",\"caption\":\"Elisa Usai\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/elisa-usai\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Password Verification Policy in MySQL 8.0.13 - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/","og_locale":"en_US","og_type":"article","og_title":"Password Verification Policy in MySQL 8.0.13","og_description":"The new release 8.0.13 for MySQL is available since last week. Concerning security, this comes with a new feature already announced: the Password Verification Policy. Let&#8217;s have a look&#8230;","og_url":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/","og_site_name":"dbi Blog","article_published_time":"2018-10-29T16:08:29+00:00","author":"Elisa Usai","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elisa Usai","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/"},"author":{"name":"Elisa Usai","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/ac5847ee8d7bad4196e72660c1377b1f"},"headline":"Password Verification Policy in MySQL 8.0.13","datePublished":"2018-10-29T16:08:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/"},"wordCount":262,"commentCount":0,"articleSection":["Database Administration &amp; Monitoring","MySQL","Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/","url":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/","name":"Password Verification Policy in MySQL 8.0.13 - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2018-10-29T16:08:29+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/ac5847ee8d7bad4196e72660c1377b1f"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Password Verification Policy in MySQL 8.0.13"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/ac5847ee8d7bad4196e72660c1377b1f","name":"Elisa Usai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d41c7e94b7e4cd42bdcc5b82003c00562de8da0cf0a1081fbe832d47e3a828ff?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d41c7e94b7e4cd42bdcc5b82003c00562de8da0cf0a1081fbe832d47e3a828ff?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d41c7e94b7e4cd42bdcc5b82003c00562de8da0cf0a1081fbe832d47e3a828ff?s=96&d=mm&r=g","caption":"Elisa Usai"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/elisa-usai\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=11953"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11953\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=11953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=11953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=11953"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=11953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}