{"id":229,"date":"2010-07-24T11:34:02","date_gmt":"2010-07-24T16:34:02","guid":{"rendered":"http:\/\/www.rajatswarup.com\/blog\/?p=229"},"modified":"2010-07-24T11:34:02","modified_gmt":"2010-07-24T16:34:02","slug":"error-1045-28000-access-denied-for-user-rootlocalhost-using-password-no","status":"publish","type":"post","link":"https:\/\/www.rajatswarup.com\/blog\/2010\/07\/24\/error-1045-28000-access-denied-for-user-rootlocalhost-using-password-no\/","title":{"rendered":"ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@&#8217;localhost&#8217; (using password: NO)"},"content":{"rendered":"<p>If this is the error you are getting then one of the solutions is to reset your root password on the MySQL database server.<br \/>\n<code><br \/>\n$ pkill mysql<br \/>\n$ sudo mysqld --skip-grant-privileges<br \/>\n$ mysql<br \/>\n<\/code><br \/>\nAt this point you get the mysql command shell.  You will need to update the root password and flush the table when you reset the password.<br \/>\n<code><br \/>\nmysql> set UPDATE mysql.user SET Password=PASSWORD('YOUR_NEW_PASSWORD') WHERE User='root';<br \/>\nmysql> FLUSH PRIVILEGES;<br \/>\n<\/code><br \/>\nNow that you&#8217;ve flushed your passwords, just restart your mysql daemon.<br \/>\n<code><br \/>\n$ sudo pkill mysqld<br \/>\n$ sudo \/etc\/init.d\/mysqld start<br \/>\n$ mysql -u root -p<br \/>\nEnter Password: YOUR_NEW_PASSWORD<br \/>\nmysql><br \/>\n<\/code><br \/>\nYou should be all set now!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If this is the error you are getting then one of the solutions is to reset your root password on the MySQL database server. $ pkill mysql $ sudo mysqld &#8211;skip-grant-privileges $ mysql At this point you get the mysql command shell. You will need to update the root password and flush the table when [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[230],"tags":[229,467,408],"class_list":["post-229","post","type-post","status-publish","format-standard","hentry","category-howto","tag-error","tag-howto","tag-mysql"],"_links":{"self":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/comments?post=229"}],"version-history":[{"count":2,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/229\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/posts\/229\/revisions\/234"}],"wp:attachment":[{"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/media?parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/categories?post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rajatswarup.com\/blog\/wp-json\/wp\/v2\/tags?post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}