{"id":1634,"date":"2014-07-24T08:09:53","date_gmt":"2014-07-24T08:09:53","guid":{"rendered":"http:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=1634"},"modified":"2023-08-03T07:59:21","modified_gmt":"2023-08-03T06:59:21","slug":"recover-mysql-root-password","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/","title":{"rendered":"How to Recover MySQL Root Password ?"},"content":{"rendered":"<p>You can recover MySQL root password if you don&#8217;t remember the old password OR if it isn&#8217;t working. Performing 5 steps with the commands as it is, will reset the MySQL root password for you. <!--more--><\/p>\n<p>1. Stop the MySQL service.<br \/>\n2. Start the MySQL service in safe mode. Doing this, it won&#8217;t ask you for password.<br \/>\n3. Access MySQL as root user.<br \/>\n4. Set a new password for MySQL root user.<br \/>\n5. Restart MySQL service.<\/p>\n<p>Above are the steps. If you are unsure with the commands, kindly follow them as below.<\/p>\n<p>1. Stop the MySQL service.<\/p>\n<blockquote><p># \/etc\/init.d\/mysql stop<\/p><\/blockquote>\n<p>2. Start the MySQL service in safe mode. Doing this, it won&#8217;t ask you for password.<\/p>\n<blockquote><p># mysqld_safe &#8211;skip-grant-tables &amp;<\/p><\/blockquote>\n<p>3. Access MySQL as root user.<\/p>\n<blockquote><p># mysql -u root<\/p><\/blockquote>\n<p>4. Set a new password for MySQL root user.<\/p>\n<blockquote><p>mysql&gt; use mysql;<br \/>\nmysql&gt; update user set password=PASSWORD(&#8220;New-Password&#8221;) where User=&#8217;root&#8217;;<br \/>\nmysql&gt; flush privileges;<br \/>\nmysql&gt; quit<\/p><\/blockquote>\n<p>5. Restart MySQL service.<\/p>\n<blockquote><p># \/etc\/init.d\/mysql stop<\/p><\/blockquote>\n<p>Now try connecting MySQL with the new root password. You should be able to get into the MySQL prompt.<\/p>\n<p><strong>Note: Replace New-Password in Step 4 with the actual password you wish to set. <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can recover MySQL root password if you don&#8217;t remember the old password OR if it isn&#8217;t working. Performing 5 steps with the commands as it is, will reset the MySQL root password for you.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-1634","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Recover MySQL Root Password ?<\/title>\n<meta name=\"description\" content=\"Forgot your MySQL root password? Don&#039;t worry! This step-by-step guide walks you through the process of recovering your MySQL root password. Learn essential methods to regain access to your MySQL database and resume seamless management of your data.\" \/>\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.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Recover MySQL Root Password ?\" \/>\n<meta property=\"og:description\" content=\"Forgot your MySQL root password? Don&#039;t worry! This step-by-step guide walks you through the process of recovering your MySQL root password. Learn essential methods to regain access to your MySQL database and resume seamless management of your data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-24T08:09:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-03T06:59:21+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated 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\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/\",\"name\":\"How to Recover MySQL Root Password ?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2014-07-24T08:09:53+00:00\",\"dateModified\":\"2023-08-03T06:59:21+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69\"},\"description\":\"Forgot your MySQL root password? Don't worry! This step-by-step guide walks you through the process of recovering your MySQL root password. Learn essential methods to regain access to your MySQL database and resume seamless management of your data.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Recover MySQL Root Password ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/42e5b55cc2772cd685c8803f6f7f854b?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/42e5b55cc2772cd685c8803f6f7f854b?s=96&d=blank&r=g\",\"caption\":\"admin\"},\"description\":\"With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Recover MySQL Root Password ?","description":"Forgot your MySQL root password? Don't worry! This step-by-step guide walks you through the process of recovering your MySQL root password. Learn essential methods to regain access to your MySQL database and resume seamless management of your data.","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.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/","og_locale":"en_GB","og_type":"article","og_title":"How to Recover MySQL Root Password ?","og_description":"Forgot your MySQL root password? Don't worry! This step-by-step guide walks you through the process of recovering your MySQL root password. Learn essential methods to regain access to your MySQL database and resume seamless management of your data.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2014-07-24T08:09:53+00:00","article_modified_time":"2023-08-03T06:59:21+00:00","author":"admin","twitter_misc":{"Written by":"admin","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/","name":"How to Recover MySQL Root Password ?","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2014-07-24T08:09:53+00:00","dateModified":"2023-08-03T06:59:21+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69"},"description":"Forgot your MySQL root password? Don't worry! This step-by-step guide walks you through the process of recovering your MySQL root password. Learn essential methods to regain access to your MySQL database and resume seamless management of your data.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/recover-mysql-root-password\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Recover MySQL Root Password ?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/42e5b55cc2772cd685c8803f6f7f854b?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/42e5b55cc2772cd685c8803f6f7f854b?s=96&d=blank&r=g","caption":"admin"},"description":"With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/admin\/"}]}},"views":1157,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/1634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=1634"}],"version-history":[{"count":5,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/1634\/revisions"}],"predecessor-version":[{"id":14925,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/1634\/revisions\/14925"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=1634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=1634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=1634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}