{"id":4713,"date":"2022-11-29T08:08:45","date_gmt":"2022-11-29T08:08:45","guid":{"rendered":"https:\/\/sparksupport.com\/blog\/?p=4713"},"modified":"2024-06-21T11:43:52","modified_gmt":"2024-06-21T11:43:52","slug":"phpmyadmin-access-denied","status":"publish","type":"post","link":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/","title":{"rendered":"phpMyAdmin &#8211; Access Denied"},"content":{"rendered":"<p>Recently, I encountered the error &#8220;Access Denied&#8221; right after a fresh phpMyAdmin installation on one of my desktop machines running on an older Ubuntu version. Even though I was sure that the password entered was correct, the application was throwing this error. Really annoying, right ?<\/p>\n<p>After some googling and experimenting with the application &amp; database configuration, I found the MySQL Authentication Plugin to be the culprit. I am sharing the details if this would help someone who encounters similar situation.<\/p>\n<p>You may get the following error while trying to connect to mysql database via phpMyAdmin application.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Common Error : Cannot log in to the MySQL server\r\nmysqli_real_connect(): (HY000\/1045): Access denied for user 'root'@'localhost' (using password: YES)<\/pre>\n<p>Additional to that, sometimes there would be an additional error which may look like below.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Connection for controluser as defined in your configuration failed.<\/pre>\n<p>For fixing the controluser error, check the content of the file <strong>\/etc\/phpmyadmin\/config-db.php<\/strong> and confirm that the mysql username &amp; password is saved correctly.<\/p>\n<p>For root user, you may check the login using the command<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">mysql -u root -p<\/pre>\n<p>Enter the root password when prompted.<\/p>\n<p>Sometimes eventhough the password is correct, phpmyadmin wont let you in. Its because of the Authentication Plugin, which happened in my case.<\/p>\n<p>Common Authentication plugins used in MySQL are &#8211; <strong>caching_sha2_password, mysql_native_password, mysql_clear_password, sha256_password, auth_socket <\/strong>etc<\/p>\n<p>A simple mysql query from SQL prompt would reveal the authentication plugin associated with each user.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">mysql&gt; SELECT user,authentication_string,plugin,host FROM mysql.user;<\/pre>\n<p>Run the query below to change the authentication plugin used for the user who you are trying to login as.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mypassword';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>Now you should be able to access your phpMyAdmin interface and play with the databases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I encountered the error &#8220;Access Denied&#8221; right after a fresh phpMyAdmin installation on one of my desktop machines running on an older Ubuntu version.<\/p>\n","protected":false},"author":8,"featured_media":5025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6,29],"tags":[],"class_list":["post-4713","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-mysql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>phpMyAdmin - Access Denied -<\/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:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"phpMyAdmin - Access Denied -\" \/>\n<meta property=\"og:description\" content=\"Recently, I encountered the error &#8220;Access Denied&#8221; right after a fresh phpMyAdmin installation on one of my desktop machines running on an older Ubuntu version.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-29T08:08:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-21T11:43:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2022\/11\/creer-bdd-phpmyadmin.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"666\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Sai Kottuvally\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sai Kottuvally\" \/>\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:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/\"},\"author\":{\"name\":\"Sai Kottuvally\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/2680e1db2b8fb1423219f4d8ed75cdc5\"},\"headline\":\"phpMyAdmin &#8211; Access Denied\",\"datePublished\":\"2022-11-29T08:08:45+00:00\",\"dateModified\":\"2024-06-21T11:43:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/\"},\"wordCount\":253,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/creer-bdd-phpmyadmin.webp\",\"articleSection\":[\"linux\",\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/\",\"url\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/\",\"name\":\"phpMyAdmin - Access Denied -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/creer-bdd-phpmyadmin.webp\",\"datePublished\":\"2022-11-29T08:08:45+00:00\",\"dateModified\":\"2024-06-21T11:43:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/creer-bdd-phpmyadmin.webp\",\"contentUrl\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/creer-bdd-phpmyadmin.webp\",\"width\":1024,\"height\":666},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/phpmyadmin-access-denied\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"phpMyAdmin &#8211; Access Denied\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/\",\"name\":\"SparkSupport Blog\",\"description\":\"SparkSupport Blogs\",\"publisher\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#organization\",\"name\":\"SparkSupport\",\"url\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/cropped-logo-1.jpg\",\"contentUrl\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/cropped-logo-1.jpg\",\"width\":216,\"height\":44,\"caption\":\"SparkSupport\"},\"image\":{\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/2680e1db2b8fb1423219f4d8ed75cdc5\",\"name\":\"Sai Kottuvally\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f5820191717ad5b3b62c3d2b96e7ae30ee17130792e99a01f96fec0694245260?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f5820191717ad5b3b62c3d2b96e7ae30ee17130792e99a01f96fec0694245260?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f5820191717ad5b3b62c3d2b96e7ae30ee17130792e99a01f96fec0694245260?s=96&d=mm&r=g\",\"caption\":\"Sai Kottuvally\"},\"description\":\"Sai Kottuvally is the Chief Technology Officer at SparkSupport, bringing over a decade of hands-on experience in software development and strategic tech leadership. As a seasoned developer turned CTO, Sai has been at the core of SparkSupport\u2019s innovation journey for the past 10 years \u2014 leading diverse technology teams, architecting scalable solutions, and driving the company\u2019s growth in the offshore IT services space. Passionate about clean code, DevOps practices, and emerging technologies, he bridges technical expertise with business vision to deliver impactful results for global clients.\",\"url\":\"https:\\\/\\\/sparksupport.com\\\/blog\\\/author\\\/sai\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"phpMyAdmin - Access Denied -","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:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/","og_locale":"en_US","og_type":"article","og_title":"phpMyAdmin - Access Denied -","og_description":"Recently, I encountered the error &#8220;Access Denied&#8221; right after a fresh phpMyAdmin installation on one of my desktop machines running on an older Ubuntu version.","og_url":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/","article_published_time":"2022-11-29T08:08:45+00:00","article_modified_time":"2024-06-21T11:43:52+00:00","og_image":[{"width":1024,"height":666,"url":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2022\/11\/creer-bdd-phpmyadmin.webp","type":"image\/webp"}],"author":"Sai Kottuvally","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sai Kottuvally","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#article","isPartOf":{"@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/"},"author":{"name":"Sai Kottuvally","@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/person\/2680e1db2b8fb1423219f4d8ed75cdc5"},"headline":"phpMyAdmin &#8211; Access Denied","datePublished":"2022-11-29T08:08:45+00:00","dateModified":"2024-06-21T11:43:52+00:00","mainEntityOfPage":{"@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/"},"wordCount":253,"commentCount":0,"publisher":{"@id":"https:\/\/sparksupport.com\/blog\/#organization"},"image":{"@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#primaryimage"},"thumbnailUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2022\/11\/creer-bdd-phpmyadmin.webp","articleSection":["linux","MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/","url":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/","name":"phpMyAdmin - Access Denied -","isPartOf":{"@id":"https:\/\/sparksupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#primaryimage"},"image":{"@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#primaryimage"},"thumbnailUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2022\/11\/creer-bdd-phpmyadmin.webp","datePublished":"2022-11-29T08:08:45+00:00","dateModified":"2024-06-21T11:43:52+00:00","breadcrumb":{"@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#primaryimage","url":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2022\/11\/creer-bdd-phpmyadmin.webp","contentUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2022\/11\/creer-bdd-phpmyadmin.webp","width":1024,"height":666},{"@type":"BreadcrumbList","@id":"https:\/\/sparksupport.com\/blog\/phpmyadmin-access-denied\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sparksupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"phpMyAdmin &#8211; Access Denied"}]},{"@type":"WebSite","@id":"https:\/\/sparksupport.com\/blog\/#website","url":"https:\/\/sparksupport.com\/blog\/","name":"SparkSupport Blog","description":"SparkSupport Blogs","publisher":{"@id":"https:\/\/sparksupport.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sparksupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/sparksupport.com\/blog\/#organization","name":"SparkSupport","url":"https:\/\/sparksupport.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-logo-1.jpg","contentUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-logo-1.jpg","width":216,"height":44,"caption":"SparkSupport"},"image":{"@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/person\/2680e1db2b8fb1423219f4d8ed75cdc5","name":"Sai Kottuvally","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f5820191717ad5b3b62c3d2b96e7ae30ee17130792e99a01f96fec0694245260?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f5820191717ad5b3b62c3d2b96e7ae30ee17130792e99a01f96fec0694245260?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f5820191717ad5b3b62c3d2b96e7ae30ee17130792e99a01f96fec0694245260?s=96&d=mm&r=g","caption":"Sai Kottuvally"},"description":"Sai Kottuvally is the Chief Technology Officer at SparkSupport, bringing over a decade of hands-on experience in software development and strategic tech leadership. As a seasoned developer turned CTO, Sai has been at the core of SparkSupport\u2019s innovation journey for the past 10 years \u2014 leading diverse technology teams, architecting scalable solutions, and driving the company\u2019s growth in the offshore IT services space. Passionate about clean code, DevOps practices, and emerging technologies, he bridges technical expertise with business vision to deliver impactful results for global clients.","url":"https:\/\/sparksupport.com\/blog\/author\/sai\/"}]}},"_links":{"self":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/posts\/4713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/comments?post=4713"}],"version-history":[{"count":0,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/posts\/4713\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/media\/5025"}],"wp:attachment":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/media?parent=4713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/categories?post=4713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/tags?post=4713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}