{"id":30077,"date":"2021-01-18T03:08:27","date_gmt":"2021-01-17T19:08:27","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&#038;p=30077"},"modified":"2022-09-08T21:33:49","modified_gmt":"2022-09-08T13:33:49","slug":"mysql-passwords-do-not-work-after-upgrade","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/mysql-passwords-do-not-work-after-upgrade","title":{"rendered":"MySQL passwords do not work after upgrade"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"30077\" class=\"elementor elementor-30077\" data-elementor-post-type=\"kb\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-199288b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"199288b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-889a206\" data-id=\"889a206\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-027dbb3 elementor-widget elementor-widget-heading\" data-id=\"027dbb3\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">MySQL passwords do not work after upgrade<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-95b8598 elementor-widget elementor-widget-text-editor\" data-id=\"95b8598\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>This article describes a problem that occurs after a server is upgraded to MySQL 5.6.5 or later, and how to resolve it. <\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c59fd4b elementor-widget elementor-widget-heading\" data-id=\"c59fd4b\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">PROBLEM<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b932cd1 elementor-widget elementor-widget-text-editor\" data-id=\"b932cd1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>When you try to access a database on a server running MySQL 5.6.5 or later the login fails, even though you are using the correct username and password.<\/p><p>For example, if you are running WordPress on your site, you see the following error message:<\/p><pre>Error establishing a database connection<\/pre><p>Other web applications may display similar messages about database connection errors. <\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6c6ea99 elementor-widget elementor-widget-heading\" data-id=\"6c6ea99\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">CAUSE<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f49e8f0 elementor-widget elementor-widget-text-editor\" data-id=\"f49e8f0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>This problem occurs because MySQL 5.6.5 and later versions use a new hashing method for user passwords. These newer MySQL versions do not support the hash method that was used in older versions of MySQL to store passwords, so logins fail.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0985ab0 elementor-widget elementor-widget-heading\" data-id=\"0985ab0\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">RESOLUTION<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-259b4f1 elementor-widget elementor-widget-text-editor\" data-id=\"259b4f1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>To resolve this problem, you must delete and recreate the database user. When you do this, MySQL uses the new hash method to store the password, and the database user can log in again.<\/p><p>To do this, follow these steps:<\/p><ol><li>Firstly, log in to cPanel.<br \/><br \/><\/li><li>In the\u00a0<strong>Databases\u00a0<\/strong>section of the cPanel home screen, click\u00a0<strong>MySQL Databases<\/strong>.<br \/><br \/><\/li><li>Under\u00a0<strong>Current Users<\/strong>, locate the database user that you want to recreate, and then click the\u00a0<strong>Delete\u00a0<\/strong>icon.<br \/><br \/><\/li><li>Next, click <strong>Delete MySQL Users<\/strong> to confirm the deletion, and then click <strong>Go Back<\/strong>.<br \/><br \/><\/li><li>Under\u00a0<strong>Add a New User<\/strong>, in the\u00a0<strong>Username\u00a0<\/strong>text box, type the username of the user you deleted in step 3.<br \/><br \/><\/li><li>After that, type the user password in the <strong>Password<\/strong> text box.<br \/><br \/><\/li><li>In the\u00a0<strong>Password (Again)<\/strong>\u00a0text box, retype the user password.<br \/><br \/><\/li><li>Lastly, click on<strong> Create a User<\/strong>. cPanel creates the database user using the new hashing method to store the password. <\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-559354f elementor-widget elementor-widget-text-editor\" data-id=\"559354f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Check out the next article on <a href=\"https:\/\/www.casbay.com.my\/guide\/kb\/how-to-fix-ssl-mixed-content-issues-on-wordpress\/\">HOW TO: Fix SSL Mixed Content Issues on WordPress<\/a>.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>MySQL passwords do not work after upgrade This article describes a problem that occurs after a server is upgraded to MySQL 5.6.5 or later, and how to resolve it. PROBLEM When you try to access a database on a server running MySQL 5.6.5 or later the login fails, even though you are using the correct [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","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":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","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-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-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-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-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-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-gradient":""}}},"kbtopic":[117,60],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30077"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=30077"}],"version-history":[{"count":1,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30077\/revisions"}],"predecessor-version":[{"id":32045,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30077\/revisions\/32045"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=30077"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=30077"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=30077"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=30077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}