{"id":26925,"date":"2016-11-21T09:04:58","date_gmt":"2016-11-21T07:04:58","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=26925"},"modified":"2016-11-21T09:04:58","modified_gmt":"2016-11-21T07:04:58","slug":"fixing-innodb-error-log-file-ib_logfile0-is-of-different-size","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/21\/fixing-innodb-error-log-file-ib_logfile0-is-of-different-size\/","title":{"rendered":"Fixing &#8220;InnoDB: Error: log file .\/ib_logfile0 is of different size&#8221;"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>For the last few days I&#8217;ve been moving MySQL databases around at work. \u00a0Being a bit in a rush and overconfident (I have backups!), \u00a0I was simply detaching the <em>\/var\/lib\/mysql<\/em> volume on one host (running Amazon AMI and MySQL) and attaching it to another host (running CentOS 7 and MariaDB).<\/p>\n<p>It&#8217;s not surprising that I got\u00a0this error: &#8220;<em>InnoDB: Error: log file .\/ib_logfile0 is of different size<\/em>&#8220;. \u00a0Gladly, <a href=\"http:\/\/serverfault.com\/questions\/104014\/innodb-error-log-file-ib-logfile0-is-of-different-size\">this ServerFault thread<\/a> provided enough hints for me to solve the problem. \u00a0In a nutshell:<\/p>\n<ol>\n<li>Temporarily comment out the InnoDB log file size setting (e.g.:\u00a0<em>innodb_log_file_size = 64M<\/em>) in<em> \/etc\/my.cnf<\/em>.<\/li>\n<li>Set\u00a0<em>innodb_fast_shutdown<\/em> to 0 (<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.6\/en\/innodb-parameters.html#sysvar_innodb_fast_shutdown\">read more<\/a>).<\/li>\n<li>Restart the MySQL service once or twice.<\/li>\n<li>Uncomment the log file size setting.<\/li>\n<li>Set InnoDB fast shutdown back to default or remove it from your <em>my.cnf<\/em> altogether.<\/li>\n<li>Celebrate!<\/li>\n<\/ol>\n<p>Knowing how little I learn from my own mistakes, I&#8217;m sure I&#8217;ll find this post useful in the future.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>For the last few days I&#8217;ve been moving MySQL databases around at work. \u00a0Being a bit in a rush and overconfident (I have backups!), \u00a0I was simply detaching the \/var\/lib\/mysql volume on one host (running Amazon AMI and MySQL) and attaching it to another host (running CentOS 7 and MariaDB). It&#8217;s not surprising that I &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/21\/fixing-innodb-error-log-file-ib_logfile0-is-of-different-size\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Fixing &#8220;InnoDB: Error: log file .\/ib_logfile0 is of different size&#8221;<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Fixing \"InnoDB: Error: log file .\/ib_logfile0 is of different size\" #MySQL #SysAdmin #Linux #databases","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,133,62],"tags":[1559,3066],"keyring_services":[],"class_list":["post-26925","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-sysadmin","category-technology","tag-databases","tag-mysql"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":11326,"url":"https:\/\/mamchenkov.net\/wordpress\/2008\/08\/03\/innodb-is-better-for-sugarcrm\/","url_meta":{"origin":26925,"position":0},"title":"InnoDB is better for SugarCRM","author":"Leonid Mamchenkov","date":"August 3, 2008","format":false,"excerpt":"After SugarCRM was deployed, we were experiencing some lock ups.\u00a0 Not frequent or dangerous, but annoying.\u00a0 About once a week or every ten days or so, SugarCRM would lock up and won't answer any queries at all.\u00a0 Not even the login was possible.\u00a0 A brief investigation showed that somehow it\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28508,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/04\/20\/mysql-8-0-release\/","url_meta":{"origin":26925,"position":1},"title":"MySQL 8.0 release","author":"Leonid Mamchenkov","date":"April 20, 2018","format":false,"excerpt":"MySQL 8.0 has been released and it brings the following new features, enhancements, and more: SQL\u00a0Window functions, Common Table Expressions, NOWAIT and SKIP LOCKED, Descending Indexes, Grouping, Regular Expressions, Character Sets, Cost Model, and Histograms. JSON\u00a0Extended syntax, new functions, improved sorting, and partial updates. With JSON table functions you can\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10016,"url":"https:\/\/mamchenkov.net\/wordpress\/2006\/03\/28\/daily-del-icio-us-bookmarks\/","url_meta":{"origin":26925,"position":2},"title":"Daily del.icio.us bookmarks","author":"Leonid Mamchenkov","date":"March 28, 2006","format":false,"excerpt":"Shared bookmarks for del.icio.us user tvset on 2006-03-27 How to have a 36 hour day Tagged as: guides lists management productivity time tips work MySQL Manual: The InnoDB Storage Engine Tagged as: concepts databases development mysql optimization references sql MySQL: Storage Engine (Table Types) Tagged as: concepts databases development mysql\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10028,"url":"https:\/\/mamchenkov.net\/wordpress\/2006\/03\/31\/mysql-misunderstanding\/","url_meta":{"origin":26925,"position":3},"title":"MySQL misunderstanding","author":"Leonid Mamchenkov","date":"March 31, 2006","format":false,"excerpt":"I'm writing this down to warn you and to burn it into my memory. For one of my projects I am using MySQL with InnoDB tables.\u00c2\u00a0 Which are great, by the way.\u00c2\u00a0 So I have this really huge table - about 8 GBytes with few million rows - that I\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14795,"url":"https:\/\/mamchenkov.net\/wordpress\/2011\/04\/27\/mysql-export-csv-into-outfile-triggers-access-denied-error\/","url_meta":{"origin":26925,"position":4},"title":"MySQL export CSV into OUTFILE triggers &#8220;access denied&#8221; error","author":"Leonid Mamchenkov","date":"April 27, 2011","format":false,"excerpt":"I came across a weird problem today. \u00a0Gladly, the web is full of solutions, but I'm going to post this anyway, just to have it nearby for the next time. \u00a0I needed to export the results of some query into a CSV file directly from MySQL. \u00a0I prepared my query,\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16834,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/10\/12\/fixing-mysql-error-cannot-load-from-mysql-proc-the-table-is-probably-corrupted\/","url_meta":{"origin":26925,"position":5},"title":"Fixing MySQL error &#8220;Cannot load from mysql.proc. The table is probably corrupted&#8221;","author":"Leonid Mamchenkov","date":"October 12, 2012","format":"link","excerpt":"Fixing MySQL error \"Cannot load from mysql.proc. The table is probably corrupted\" After a recent upgrade of some of my CentOS 6.3 servers to MySQL 5.5 from the Remi repository, I started noticing errors like this one in the logs, especially during backups: MySQL: SHOW FUNCTION STATUS WHERE Db =\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/26925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=26925"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/26925\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=26925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=26925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=26925"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=26925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}