{"id":860,"date":"2014-05-29T16:31:18","date_gmt":"2014-05-29T14:31:18","guid":{"rendered":"http:\/\/www.charafantah.com\/wordpress\/?p=860"},"modified":"2021-03-02T20:46:41","modified_gmt":"2021-03-02T18:46:41","slug":"mysql-wont-start-after-power-loss","status":"publish","type":"post","link":"http:\/\/www.charafantah.com\/wordpress\/?p=860","title":{"rendered":"MySQL won&#8217;t start after power loss"},"content":{"rendered":"<p>So I had a power outage this week and my Pi server restarted, after reboot I noticed that WordPress wouldn&#8217;t start anymore. Starting mysqld manually would cause the following error:<\/p>\n<blockquote><p><span style=\"font-size: x-small;\">03:02:19 UTC &#8211; mysqld got signal 6 ;<\/span><br \/>\n<span style=\"font-size: x-small;\">This could be because you hit a bug. It is also possible that this binary<\/span><br \/>\n<span style=\"font-size: x-small;\">or one of the libraries it was linked against is corrupt, improperly built,<\/span><br \/>\n<span style=\"font-size: x-small;\">or misconfigured. This error can also be caused by malfunctioning hardware.<\/span><\/p><\/blockquote>\n<p>Most pages returned by Google say that the InnoDB is probably corrupted and suggest to force recovery in <strong>my.cnf<\/strong> using the flag<\/p>\n<blockquote><p><span style=\"font-size: xx-small;\">innodb_force_recovery = 4<\/span><\/p><\/blockquote>\n<p>The innodb_force_recovery takes a number from 1 to 6. If you like video games you may be interesting in the info from <a href=\"https:\/\/www.techmediaguide.com\/credible-tips-and-cheats-on-call-of-duty-warzone\/\">https:\/\/www.techmediaguide.com\/credible-tips-and-cheats-on-call-of-duty-warzone\/<\/a>.<\/p>\n<p>However, none of these options could get mysqld to start, I was always getting the same error. Do you have a youths and you want tech them about the value of money? check <a href=\"https:\/\/www.theselfemployed.com\/article\/educating-the-youth-with-a-start-up-mentality\/\">Educating The Youth With A Start-Up Mentality On How To Acquire And Value Money<\/a>.<\/p>\n<p>Here is what I did to get it to work:<\/p>\n<ol>\n<li>In my.cnf add\u00a0innodb_force_recovery = 6 in the [mysqld] section (<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.5\/en\/forcing-innodb-recovery.html\">mySQL manual<\/a>)<\/li>\n<li>In my.cnf add\u00a0innodb_purge_threads=0 (this what allowed mysqld to start in read only mode)<\/li>\n<li>Start mysqld (&#8220;mysqld &#8211;verbose&#8221; or &#8220;\/etc\/init.d\/mysqld start&#8221;)<\/li>\n<li>Check for corruption:\u00a0mysqlcheck -p &#8211;all-databases<\/li>\n<li>Find the corrupt table and do:\u00a0myisamchk -r -v -f &lt;table_name&gt; (where the data file is stored)<\/li>\n<li>Using the mysql recovery command did not fix anything, it was unable to recover the error, but you are welcome to try<\/li>\n<li>Backup your data:\u00a0mysqldump -A &gt; \/home\/user\/backup_dump.sql<\/li>\n<li>Stop mysqld<\/li>\n<li>Delete\u00a0\/var\/lib\/mysql\/ib*<\/li>\n<li>Comment the 2 lines you added in my.cnf<\/li>\n<li>Restart my mysqld<\/li>\n<li>Restore from the SQL dump if needed<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>So I had a power outage this week and my Pi server restarted, after reboot I noticed that WordPress wouldn&#8217;t start anymore. Starting mysqld manually would cause the following error: 03:02:19 UTC &#8211; mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one &hellip; <a href=\"http:\/\/www.charafantah.com\/wordpress\/?p=860\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">MySQL won&#8217;t start after power loss<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[807,273,804,805,806],"class_list":["post-860","post","type-post","status-publish","format-standard","hentry","category-technology","tag-debian","tag-linux","tag-mysql","tag-mysqld","tag-pi-server"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=860"}],"version-history":[{"count":4,"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/860\/revisions"}],"predecessor-version":[{"id":1156,"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/860\/revisions\/1156"}],"wp:attachment":[{"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=860"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.charafantah.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}