<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>How to fix "MySQL server has gone away" (error 2006)</title> <atom:link href="http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html/feed" rel="self" type="application/rss+xml" /><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Sat, 19 May 2012 15:27:39 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139764</link> <dc:creator>André</dc:creator> <pubDate>Thu, 12 Apr 2012 05:02:14 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139764</guid> <description>Very much cool this tip!!
It works so good to me!!
Thanks so much!!!</description> <content:encoded><![CDATA[<p>Very much cool this tip!!<br
/> It works so good to me!!<br
/> Thanks so much!!!</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139657</link> <dc:creator>Bogdan</dc:creator> <pubDate>Fri, 30 Mar 2012 22:11:35 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139657</guid> <description>@Badera, did you restart the MySQL server after changing configuration?
Also, just before attempting the import, try
&lt;blockquote&gt;set session max_allowed_packet=128000000;&lt;/blockquote&gt;
from within the mysql-client session (or just add this statement at the very top of the SQL file you are importing). I have no idea if this statement still works in current versions of MySQL - please post if it does [not].</description> <content:encoded><![CDATA[<p>@Badera, did you restart the MySQL server after changing configuration?</p><p>Also, just before attempting the import, try</p><blockquote><p>set session max_allowed_packet=128000000;</p></blockquote><p>from within the mysql-client session (or just add this statement at the very top of the SQL file you are importing). I have no idea if this statement still works in current versions of MySQL &#8211; please post if it does [not].</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139649</link> <dc:creator>badera</dc:creator> <pubDate>Fri, 30 Mar 2012 10:36:16 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139649</guid> <description>-.-
It IS definitely Error 2006 (HY000).</description> <content:encoded><![CDATA[<p>-.-<br
/> It IS definitely Error 2006 (HY000).</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139616</link> <dc:creator>SKS</dc:creator> <pubDate>Wed, 28 Mar 2012 08:54:12 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139616</guid> <description>Hi Guys,
When i try reconnecting after 5mins sleep/idle to mysql db from remote host it&#039;s lossing it connection with the following error.
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 19068867
Current database: *** NONE ***</description> <content:encoded><![CDATA[<p>Hi Guys,</p><p>When i try reconnecting after 5mins sleep/idle to mysql db from remote host it&#8217;s lossing it connection with the following error.</p><p>ERROR 2006 (HY000): MySQL server has gone away<br
/> No connection. Trying to reconnect&#8230;<br
/> Connection id: 19068867<br
/> Current database: *** NONE ***</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139516</link> <dc:creator>Bogdan</dc:creator> <pubDate>Fri, 23 Mar 2012 20:20:11 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139516</guid> <description>@Badera, do you really get error 2006? Maybe your error is just different.</description> <content:encoded><![CDATA[<p>@Badera, do you really get error 2006? Maybe your error is just different.</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139505</link> <dc:creator>badera</dc:creator> <pubDate>Fri, 23 Mar 2012 08:23:44 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139505</guid> <description>@Bogdan:
I also tried 128MB for the 82MB dump file, no success.</description> <content:encoded><![CDATA[<p>@Bogdan:<br
/> I also tried 128MB for the 82MB dump file, no success.</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139490</link> <dc:creator>Bogdan</dc:creator> <pubDate>Thu, 22 Mar 2012 21:14:18 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139490</guid> <description>@Badera,
if that entire dump is wrapped in a transaction, then you may need to set max_allowed_packet to e.g. 96MB (basically, anything larger than your dump size). But that&#039;s just a guess.</description> <content:encoded><![CDATA[<p>@Badera,</p><p>if that entire dump is wrapped in a transaction, then you may need to set max_allowed_packet to e.g. 96MB (basically, anything larger than your dump size). But that&#8217;s just a guess.</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-139398</link> <dc:creator>badera</dc:creator> <pubDate>Fri, 16 Mar 2012 12:16:12 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-139398</guid> <description>What can I do when those two entries
max_allowed_packet= 64M
wait_timeout= 6000
are not enough to restore a 82MB database via
mysql&gt; \. thedumpfile.dmp
I am fiddling around for 2 days now without any success - any other idea than the two lines? (MySQL Server 5.5.16)</description> <content:encoded><![CDATA[<p>What can I do when those two entries</p><p>max_allowed_packet= 64M<br
/> wait_timeout= 6000</p><p>are not enough to restore a 82MB database via</p><p>mysql&gt; \. thedumpfile.dmp</p><p>I am fiddling around for 2 days now without any success &#8211; any other idea than the two lines? (MySQL Server 5.5.16)</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-138866</link> <dc:creator>Tim Traxly</dc:creator> <pubDate>Tue, 14 Feb 2012 17:50:40 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-138866</guid> <description>RipleySW2,
You saved me! I was almost crying, trying to import &lt;a href=&quot;http://babushkaslots.com/&quot; rel=&quot;nofollow&quot;&gt;babushkaslots.com&lt;/a&gt; mySQL DB! Luckily your advice worked like a charm and the dinner with my wife was saved!!!
BTW, WAMP have a really nice interface to get to the config. files
Thanks again,
Hungry Tim
:)</description> <content:encoded><![CDATA[<p>RipleySW2,</p><p>You saved me! I was almost crying, trying to import <a
href="http://babushkaslots.com/" rel="nofollow">babushkaslots.com</a> mySQL DB! Luckily your advice worked like a charm and the dinner with my wife was saved!!!</p><p>BTW, WAMP have a really nice interface to get to the config. files</p><p>Thanks again,<br
/> Hungry Tim<br
/> <img
src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-138565</link> <dc:creator>grosir jam tangan</dc:creator> <pubDate>Sat, 07 Jan 2012 22:29:54 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-138565</guid> <description>thx for the information, it&#039;s work well to my db ^^</description> <content:encoded><![CDATA[<p>thx for the information, it&#8217;s work well to my db ^^</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-137209</link> <dc:creator>RipleySW2</dc:creator> <pubDate>Wed, 23 Nov 2011 13:21:46 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-137209</guid> <description>I&#039;m running a wamp server 1.7.2
...having error 2006 server has gone away when inserting large files into my database (nothing was inserted at all).
So, simply stop the wamp  server services, edit the my.ini file thru the wamp manager icon.
The 2 lines :
max_allowed_packet= 64M
wait_timeout= 6000
were added at the end of the file (c:wampmysqlmy.ini)
Restart Wamp Server Services
And it works ! Thanks a lot !</description> <content:encoded><![CDATA[<p>I&#8217;m running a wamp server 1.7.2</p><p>&#8230;having error 2006 server has gone away when inserting large files into my database (nothing was inserted at all).</p><p>So, simply stop the wamp  server services, edit the my.ini file thru the wamp manager icon.</p><p>The 2 lines :</p><p>max_allowed_packet= 64M<br
/> wait_timeout= 6000</p><p>were added at the end of the file (c:wampmysqlmy.ini)</p><p>Restart Wamp Server Services</p><p>And it works ! Thanks a lot !</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-136247</link> <dc:creator>massa</dc:creator> <pubDate>Wed, 21 Sep 2011 17:25:57 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-136247</guid> <description>If using PHP to feed a database and getting this MySQL error, instead of modifying my.ini, try to package your data in smaller strings and put them in an array.
Then, insert one pack at a time:
&lt;code&gt;
foreach ($pack_array as $pack) {
if ($pack != &quot;&quot;) {
$query = &quot;INSERT INTO mytable VALUES&quot; . $pack;
$result = mysql_query($query);
if (!$result) die (&quot;Database access failed: &quot; . mysql_error());
}
}
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>If using PHP to feed a database and getting this MySQL error, instead of modifying my.ini, try to package your data in smaller strings and put them in an array.<br
/> Then, insert one pack at a time:<br
/> <code><br
/> foreach ($pack_array as $pack) {<br
/> if ($pack != "") {<br
/> $query = "INSERT INTO mytable VALUES" . $pack;<br
/> $result = mysql_query($query);<br
/> if (!$result) die ("Database access failed: " . mysql_error());<br
/> }<br
/> }<br
/> </code></p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-135664</link> <dc:creator>Bogdan</dc:creator> <pubDate>Mon, 25 Jul 2011 10:04:17 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-135664</guid> <description>my.ini is only available to server administrators; on a shared hosting, you normally would not have access to that file.</description> <content:encoded><![CDATA[<p>my.ini is only available to server administrators; on a shared hosting, you normally would not have access to that file.</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-135661</link> <dc:creator>chetan</dc:creator> <pubDate>Mon, 25 Jul 2011 08:12:30 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-135661</guid> <description>Am using godaddy hosting, where can i locate my.ini , there&#039;s only php.ini file
please help!</description> <content:encoded><![CDATA[<p>Am using godaddy hosting, where can i locate my.ini , there&#8217;s only php.ini file<br
/> please help!</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-135257</link> <dc:creator>Igor Zemliansky</dc:creator> <pubDate>Thu, 16 Jun 2011 07:27:12 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-135257</guid> <description>Thanks for this advices! For me personally setting of max_allowed_packet = 64M helped.</description> <content:encoded><![CDATA[<p>Thanks for this advices! For me personally setting of max_allowed_packet = 64M helped.</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-135086</link> <dc:creator>Johnnytest</dc:creator> <pubDate>Tue, 24 May 2011 15:32:13 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-135086</guid> <description>Rjb&#039;s Solution implemented on large data sets is SLOW!!</description> <content:encoded><![CDATA[<p>Rjb&#8217;s Solution implemented on large data sets is SLOW!!</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-134610</link> <dc:creator>mckowell</dc:creator> <pubDate>Wed, 23 Mar 2011 14:04:48 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-134610</guid> <description>GRACIAS !!!</description> <content:encoded><![CDATA[<p>GRACIAS !!!</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-134595</link> <dc:creator>registry cleaner</dc:creator> <pubDate>Thu, 17 Mar 2011 06:04:18 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-134595</guid> <description>GENERAL SPECIFICATIONS:
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 64M
table_cache = 4096
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
INNODB SPECIFIC:
innodb_buffer_pool_size = 384M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 10M
innodb_log_buffer_size = 64M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 180</description> <content:encoded><![CDATA[<p>GENERAL SPECIFICATIONS:<br
/> [mysqld]<br
/> port = 3306<br
/> socket = /tmp/mysql.sock<br
/> skip-locking<br
/> key_buffer = 384M<br
/> max_allowed_packet = 64M<br
/> table_cache = 4096<br
/> sort_buffer_size = 2M<br
/> read_buffer_size = 2M<br
/> read_rnd_buffer_size = 64M<br
/> myisam_sort_buffer_size = 64M<br
/> thread_cache_size = 8<br
/> query_cache_size = 32M<br
/> INNODB SPECIFIC:<br
/> innodb_buffer_pool_size = 384M<br
/> innodb_additional_mem_pool_size = 20M<br
/> innodb_log_file_size = 10M<br
/> innodb_log_buffer_size = 64M<br
/> innodb_flush_log_at_trx_commit = 1<br
/> innodb_lock_wait_timeout = 180</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-134584</link> <dc:creator>shahid</dc:creator> <pubDate>Tue, 08 Mar 2011 04:26:31 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-134584</guid> <description>Thanks ,it really work for me, i just change the max_allowed_packet and my db is back , thanks for good information.</description> <content:encoded><![CDATA[<p>Thanks ,it really work for me, i just change the max_allowed_packet and my db is back , thanks for good information.</p> ]]></content:encoded> </item> <item><title>How to fix "MySQL server has gone away" (error 2006)</title><link>http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html#comment-128020</link> <dc:creator>Rosen Karamanov</dc:creator> <pubDate>Sun, 02 Jan 2011 21:03:24 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=464#comment-128020</guid> <description>It worked!
The file was my.ini in mysql\bin probably, because the version is another.
Thank you very much for this guide!!</description> <content:encoded><![CDATA[<p>It worked!<br
/> The file was my.ini in mysql\bin probably, because the version is another.<br
/> Thank you very much for this guide!!</p> ]]></content:encoded> </item> </channel> </rss>
