{"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;<\/p>\n<p>This 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; This aim of this feature is to secure the attempts to change a password by specifying the old one to be replaced. It is turned off&hellip;&nbsp;<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133,1316],"tags":[],"class_list":["post-11953","post","type-post","status-publish","format-standard","category-database","category-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Password Verification Policy in MySQL 8.0.13 - dbi services 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; This aim of this feature is to secure the attempts to change a password by specifying the old one to be replaced. It is turned off&hellip;&nbsp;\" \/>\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 services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-29T16:08:29+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\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\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"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,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"articleSection\":[\"Database\",\"MySQL\"],\"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 services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2018-10-29T16:08:29+00:00\",\"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\":\"Home\",\"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 services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"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\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"caption\":\"Open source Team\"},\"description\":\"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Password Verification Policy in MySQL 8.0.13 - dbi services 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; This aim of this feature is to secure the attempts to change a password by specifying the old one to be replaced. It is turned off&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/password-verification-policy-in-mysql-8-0-13\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2018-10-29T16:08:29+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Open source Team","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":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"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,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"articleSection":["Database","MySQL"],"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 services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2018-10-29T16:08:29+00:00","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":"Home","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 services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"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":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","caption":"Open source Team"},"description":"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.","url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_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\/28"}],"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"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}