{"id":1273,"date":"2015-01-12T11:04:50","date_gmt":"2015-01-12T11:04:50","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=1273"},"modified":"2021-02-16T10:01:43","modified_gmt":"2021-02-16T10:01:43","slug":"mysql-error-access-denied-for-user-rootlocalhost","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/","title":{"rendered":"MySQL Error:Access denied for user &#8216;root@localhost&#8217;"},"content":{"rendered":"<p>[wpfmb type=&#8217;error&#8217; theme=2]ERROR 1045(28000) : Access denied for user &#8216;root@localhost&#8217; (using password: no )[\/wpfmb]<br \/>\nAccess denied error occurs normally when you are not using the correct password and you have to reset the password if not sure.<br \/>\n<strong>You can reset the password by following the steps listed below.<\/strong><!--more--><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">service mysql stop<\/pre>\n<\/div>\n<p>Make sure that there is no MySQL\u00a0process running:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">ps aux | grep mysql<\/pre>\n<\/div>\n<p>Use kill command if any MySQL process is still running:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true\">killall -9 mysql<\/pre>\n<\/div>\n<p>After that start the MySQL\u00a0server in safe mode:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">\/usr\/bin\/mysqld_safe --skip-grant-tables &amp;<\/pre>\n<\/div>\n<p>You will be able to connect to MySQL\u00a0using the MySQL command as below.<br \/>\n<a href=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/01\/mysql2.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-1274 pleslwp\" src=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/01\/mysql2.jpg\" alt=\"mysql2\" width=\"644\" height=\"252\" srcset=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/01\/mysql2.jpg 644w, https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/01\/mysql2-300x117.jpg 300w, https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/01\/mysql2-636x249.jpg 636w, https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/01\/mysql2-320x125.jpg 320w, https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/01\/mysql2-239x94.jpg 239w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><br \/>\nSelect MySQL database:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">use mysql;<\/pre>\n<\/div>\n<p>Set the password for root.<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">update user set password=PASSWORD(\"putpasswordhere\") where user='root';<\/pre>\n<\/div>\n<p>If you want to access MySQL without password, use the following command:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">update user set password=PASSWORD(\"\") where user='root';<\/pre>\n<\/div>\n<p>After reload the privileges and restart MySQL<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">flush privileges;\r\nservice mysql start<\/pre>\n<\/div>\n<p>Now check running the following commands.<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true\">mysql\r\nor\r\nmysql -u root -p<\/pre>\n<\/div>\n<p>Previously we have talk about another common\u00a0MySQL error it can also be helpful for you:\u00a0<a title=\"Error : No web page was found for the web address: \u201c..databases\/phpMyAdmin\/export.php\u201d\" href=\"https:\/\/cpanelplesk.com\/wp62\/error-no-web-page-was-found-for-the-web-address-databasesphpmyadminexport-php\/\">NO WEB PAGE WAS FOUND FOR THE WEB ADDRESS: \u201c..DATABASES\/PHPMYADMIN\/EXPORT.PHP\u201d<\/a>.<\/p>\n<p class=\"post-title entry-title\">\n","protected":false},"excerpt":{"rendered":"<p>[wpfmb type=&#8217;error&#8217; theme=2]ERROR 1045(28000) : Access denied for user &#8216;root@localhost&#8217; (using password: no )[\/wpfmb] Access denied error occurs normally when you are not using the correct password and you have to reset the password if not sure. You can reset the password by following the steps listed below. [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":914,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1273","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MySQL Error:Access denied for user &#039;root@localhost&#039; - cPanel Plesk<\/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:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"MySQL Error:Access denied for user &#039;root@localhost&#039; - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"[wpfmb type=&#8217;error&#8217; theme=2]ERROR 1045(28000) : Access denied for user &#8216;root@localhost&#8217; (using password: no )[\/wpfmb] Access denied error occurs normally when you are not using the correct password and you have to reset the password if not sure. You can reset the password by following the steps listed below. [...]Continue Reading...\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Seemab Saleem\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/\"},\"author\":{\"name\":\"Seemab Saleem\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\"},\"headline\":\"MySQL Error:Access denied for user &#8216;root@localhost&#8217;\",\"datePublished\":\"2015-01-12T11:04:50+00:00\",\"dateModified\":\"2021-02-16T10:01:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/\"},\"wordCount\":161,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg\",\"articleSection\":[\"Cpanel\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/\",\"name\":\"MySQL Error:Access denied for user 'root@localhost' - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg\",\"datePublished\":\"2015-01-12T11:04:50+00:00\",\"dateModified\":\"2021-02-16T10:01:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg\",\"width\":200,\"height\":203},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Error:Access denied for user &#8216;root@localhost&#8217;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\",\"name\":\"Seemab Saleem\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"caption\":\"Seemab Saleem\"},\"description\":\"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!\",\"sameAs\":[\"https:\/\/cpanelplesk.com\/wp62\"],\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL Error:Access denied for user 'root@localhost' - cPanel Plesk","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:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/","twitter_card":"summary_large_image","twitter_title":"MySQL Error:Access denied for user 'root@localhost' - cPanel Plesk","twitter_description":"[wpfmb type=&#8217;error&#8217; theme=2]ERROR 1045(28000) : Access denied for user &#8216;root@localhost&#8217; (using password: no )[\/wpfmb] Access denied error occurs normally when you are not using the correct password and you have to reset the password if not sure. You can reset the password by following the steps listed below. [...]Continue Reading...","twitter_image":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg","twitter_misc":{"Written by":"Seemab Saleem","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/"},"author":{"name":"Seemab Saleem","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648"},"headline":"MySQL Error:Access denied for user &#8216;root@localhost&#8217;","datePublished":"2015-01-12T11:04:50+00:00","dateModified":"2021-02-16T10:01:43+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/"},"wordCount":161,"commentCount":0,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg","articleSection":["Cpanel"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/","url":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/","name":"MySQL Error:Access denied for user 'root@localhost' - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg","datePublished":"2015-01-12T11:04:50+00:00","dateModified":"2021-02-16T10:01:43+00:00","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#primaryimage","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2014\/09\/MySQL-e1443513523164.jpg","width":200,"height":203},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/mysql-error-access-denied-for-user-rootlocalhost\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"MySQL Error:Access denied for user &#8216;root@localhost&#8217;"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648","name":"Seemab Saleem","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","caption":"Seemab Saleem"},"description":"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!","sameAs":["https:\/\/cpanelplesk.com\/wp62"],"url":"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/1273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=1273"}],"version-history":[{"count":0,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/1273\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media\/914"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=1273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=1273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=1273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}