{"id":18990,"date":"2020-10-12T09:22:11","date_gmt":"2020-10-12T09:22:11","guid":{"rendered":"http:\/\/www.devopsschool.com\/blog\/?p=18990"},"modified":"2020-12-02T05:26:12","modified_gmt":"2020-12-02T05:26:12","slug":"error-mysql-shutdown-unexpectedly","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/error-mysql-shutdown-unexpectedly\/","title":{"rendered":"[SOLVED] Error: MySQL shutdown unexpectedly."},"content":{"rendered":"\n<p>When I open XAMPP and click start MySQL button and it gives me an error. I had started it just before, but now it isn&#8217;t working.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">12:19:12 PM [mysql] Attempting to start MySQL app...\n12:19:12 PM [mysql] Status change detected: running\n12:19:13 PM [mysql] Status change detected: stopped\n12:19:13 PM [mysql] Error: MySQL shutdown unexpectedly.\n12:19:13 PM [mysql] This may be due to a blocked port, missing dependencies,\n12:19:13 PM [mysql] improper privileges, a crash, or a shutdown by another method\n12:19:13 PM [mysql] Press the Logs button to view error logs and check\n12:19:13 PM [mysql] the Windows Event Viewer for more clues\n12:19:13 PM [mysql] If you need more help, copy and post this\n12:19:13 PM [mysql] entire log window on the forums<\/pre>\n\n\n\n<h1 class=\"has-text-align-center wp-block-heading\">Answer<\/h1>\n\n\n\n<p class=\"has-text-align-center\"><span class=\"has-inline-color has-vivid-red-color\"><strong>Stop there! Please do not delete anything!<\/strong><\/span><\/p>\n\n\n\n<p>Some of the answers in Stackoverflow or in other platform could leave completely unusable your database!, so, before <strong>deleting <\/strong>files, first try to do what the error message in <strong>XAMPP <\/strong>message panel recommend you to do, using the <strong>MySQL backup <\/strong>folder which is included with XAMPP. So do the next:<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Step 1.<\/span><\/strong>  Rename the folder <strong>c:\\xampp\\mysql\\data<\/strong> to <strong><strong>c:\\xampp\\mysql\\<\/strong>data_old<\/strong> (you can use any name).<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Step 2.<\/span><\/strong> Create a new folder <strong>c:\\xampp\\mysql\/data<\/strong>.<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Step 3.<\/span><\/strong> Copy the content that resides in <strong>mysql\\backup<\/strong> to the new <strong>mysql\\data<\/strong> folder.<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Step 4.<\/span><\/strong> Copy all your database folders that are in <strong><span class=\"has-inline-color has-black-color\">mysql\\data_old<\/span><\/strong> to <strong>mysql\\data<\/strong> (skipping the <strong>mysql<\/strong>, <strong>performance_schema<\/strong>, and <strong>phpmyadmin folders <\/strong>from <strong>data_old<\/strong>).<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Step 5.<\/span><\/strong> Finally copy the <strong>ibdata1<\/strong> file from <strong>mysql\\data_old<\/strong> and <strong>replace<\/strong> it inside <strong>mysql\\data<\/strong> folder.<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-vivid-red-color\">Step 6.<\/span><\/strong> Start <strong>MySQL <\/strong>from <strong>XAMPP control panel<\/strong>.<\/p>\n\n\n\n<p>And, Its <strong><span class=\"has-inline-color has-vivid-red-color\">DONE <\/span><\/strong>. No <strong>databases <\/strong>lost, no <strong>ports <\/strong>changed, no <strong>run <\/strong>as <strong>administrator<\/strong>, no <strong>force <\/strong>recovery, no <strong>kill <\/strong>mysqld process, no <strong>restoring<\/strong> from <strong>previous <\/strong>versions, no more <strong>errors<\/strong>.<\/p>\n\n\n\n<p>Thanks for Reading.<\/p>\n\n\n\n<p>keep Coding.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/11\/Keep_coding-3.gif\" alt=\"\" class=\"wp-image-19433\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I open XAMPP and click start MySQL button and it gives me an error. I had started it just before, but now it isn&#8217;t working. 12:19:12 PM [mysql] Attempting&#8230; <\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[1,5150],"tags":[2396,493,2394,2395,2393,6470,5356],"class_list":["post-18990","post","type-post","status-publish","format-standard","hentry","category-sql","category-php","tag-common-problems-in-mysql","tag-mysql","tag-mysql-basic-issues","tag-mysql-basic-problems","tag-mysql-basic-troubleshooting","tag-mysql-shutdown-unexpectedly","tag-xampp"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/18990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=18990"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/18990\/revisions"}],"predecessor-version":[{"id":19804,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/18990\/revisions\/19804"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=18990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=18990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=18990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}