<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>mysql debian on random thoughts</title><link>https://awesomeprogrammer.com/categories/mysql-debian/</link><description>Recent content in mysql debian on random thoughts</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 19 Jul 2012 00:00:00 +0000</lastBuildDate><atom:link href="https://awesomeprogrammer.com/categories/mysql-debian/index.xml" rel="self" type="application/rss+xml"/><item><title>How to deal with MySQL Error 2013</title><link>https://awesomeprogrammer.com/blog/2012/07/19/how-to-deal-with-mysql-error-2013/</link><pubDate>Thu, 19 Jul 2012 00:00:00 +0000</pubDate><guid>https://awesomeprogrammer.com/blog/2012/07/19/how-to-deal-with-mysql-error-2013/</guid><description><![CDATA[<p>Some time ago I was having problem with my script that backups all the databases on the server - one day it just began to produce empty sql files. When I ran script manually I saw unpleasant:
Error 2013: Lost connection to MySQL server
while dumping one of the tables - hence empty backups.</p>
<p>First I tried to check table, repair it and optimize it, but with no luck. So I took a look at syslog (I guess should have done that first) and saw to my surprise:
InnoDB: Database page corruption on disk (&hellip;)
I will spare you the googling and give you solution that might help you too. After reading <a href="http://dev.mysql.com/doc/refman/5.0/en/forcing-innodb-recovery.html">this reference</a> I decided to set value of
innodb_force_recovery
to 1 (in <em>/etc/my.cnf</em>), restart server, quickly dump the problematic table (with this option on database is locked so if you&rsquo;re doing in on production server maybe prepare some bash scripts first), revert changes in config and restart mysql once again.</p>
<p>After that I dropped that table and without any problems imported it again - since then everything works smooth.</p>
]]></description><content:encoded><![CDATA[<p>Some time ago I was having problem with my script that backups all the databases on the server - one day it just began to produce empty sql files. When I ran script manually I saw unpleasant:
Error 2013: Lost connection to MySQL server
while dumping one of the tables - hence empty backups.</p>
<p>First I tried to check table, repair it and optimize it, but with no luck. So I took a look at syslog (I guess should have done that first) and saw to my surprise:
InnoDB: Database page corruption on disk (&hellip;)
I will spare you the googling and give you solution that might help you too. After reading <a href="http://dev.mysql.com/doc/refman/5.0/en/forcing-innodb-recovery.html">this reference</a> I decided to set value of
innodb_force_recovery
to 1 (in <em>/etc/my.cnf</em>), restart server, quickly dump the problematic table (with this option on database is locked so if you&rsquo;re doing in on production server maybe prepare some bash scripts first), revert changes in config and restart mysql once again.</p>
<p>After that I dropped that table and without any problems imported it again - since then everything works smooth.</p>
]]></content:encoded></item></channel></rss>