{"id":34,"date":"2015-07-04T08:03:00","date_gmt":"2015-07-04T08:03:00","guid":{"rendered":"https:\/\/www.tech-and-dev.com\/blog\/2015\/07\/04\/how-to-fix-innodb-enabled-but-not-starting\/"},"modified":"2021-02-22T01:04:12","modified_gmt":"2021-02-22T01:04:12","slug":"how-to-fix-innodb-enabled-but-not-starting","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2015\/07\/how-to-fix-innodb-enabled-but-not-starting.html","title":{"rendered":"How To Fix: InnoDB Enabled But Not Starting"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/1_innodb-logo.png\"><img decoding=\"async\" title=\"InnoDB\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/1_innodb-logo.png\" alt=\"InnoDB Logo\" border=\"0\" \/><\/a><\/div>\n<p>This is for CentOS, but it should work on Debian\/Ubuntu as well. There are two reasons why InnoDB would not start:<\/p>\n<ol style=\"text-align: left;\">\n<li>It&#8217;s not enabled in my.cnf<\/li>\n<li>The log files are corrupted<\/li>\n<\/ol>\n<p><a name=\"more\"><\/a><\/p>\n<h2 style=\"text-align: left;\">1- Enabling InnoDB From my.cnf<\/h2>\n<p>Open my.cnf<\/p>\n<pre>vi \/etc\/my.cnf<\/pre>\n<p>Find and Delete <i><b>&#8211;skip-innodb<\/b><\/i><br \/>\nand save my.cnf<\/p>\n<p>Restart MySQL<\/p>\n<pre>\/etc\/init.d\/mysql restart<\/pre>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">2- Re-create The Log Files<\/h2>\n<div style=\"text-align: justify;\">Sometimes InnoDB won&#8217;t start even if it&#8217;s enabled from my.cnf. Most of the times, the reason is because the log files are corrupted.<\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\">When these log files are corrupted, MySQL will skip InnoDB storage engine and will not start it.<\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\">To fix this, MySQL has to be stopped, the log files has to be removed, and MySQL should be restarted. This will re-create the log files and start InnoDB storage engine.<\/div>\n<p>&nbsp;<\/p>\n<pre>#Stopping MySQL\r\n\/etc\/init.d\/mysql stop\r\n#Renaming Log Files to keep them as a backup\r\nmv \/var\/lib\/mysql\/ib_logfile0 \/var\/lib\/mysql\/ib_logfile0.bak\r\nmv \/var\/lib\/mysql\/ib_logfile1 \/var\/lib\/mysql\/ib_logfile1.bak\r\n#Restarting MySQL\r\n\/etc\/init.d\/mysql start<\/pre>\n<p><b>Any Questions? Please let me know below!<\/b><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is for CentOS, but it should work on Debian\/Ubuntu as well. There are two reasons why InnoDB would not start: It&#8217;s not enabled in my.cnf The log files are corrupted 1- Enabling InnoDB From my.cnf Open my.cnf vi \/etc\/my.cnf Find and Delete &#8211;skip-innodb and save my.cnf Restart MySQL \/etc\/init.d\/mysql restart &nbsp; 2- Re-create The [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[46,6,45,7],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-innodb","category-linux","category-mysql","category-ssh"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":1,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":318,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions\/318"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}