<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Jamie Le Souef&#187; All posts filed under Database</title> <atom:link href="http://jamielesouef.com/tag/database/feed/" rel="self" type="application/rss+xml" /><link>http://jamielesouef.com</link> <description>website . blog . graphic design</description> <lastBuildDate>Sat, 04 Sep 2010 17:48:00 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Tip : Backing up a large MySQL Database (errno: 24)</title><link>http://jamielesouef.com/linux/tip-backing-up-a-large-mysql-database-errno-24/</link> <comments>http://jamielesouef.com/linux/tip-backing-up-a-large-mysql-database-errno-24/#comments</comments> <pubDate>Mon, 15 Sep 2008 01:02:23 +0000</pubDate> <dc:creator>Jamie Le Souef</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[command]]></category> <category><![CDATA[Database]]></category> <category><![CDATA[export table]]></category> <category><![CDATA[merry way]]></category> <category><![CDATA[mydatabase]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[mysql databases]]></category> <category><![CDATA[mysqldump]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[table feature]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[way]]></category><guid isPermaLink="false">http://jamielesouef.com/?p=402</guid> <description><![CDATA[(errno: 24) when using LOCK TABLE. How to dump a large MySQL database via SSH. ]]></description> <content:encoded><![CDATA[<div class="tweetmeme_button" style="margin-right: 10px; margin-top:10px; margin-bottom:10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjamielesouef.com%2Flinux%2Ftip-backing-up-a-large-mysql-database-errno-24%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjamielesouef.com%2Flinux%2Ftip-backing-up-a-large-mysql-database-errno-24%2F&amp;style=normal" height="61" width="50" /><br /> </a></div><p>Today I&#8217;ve run into a bit of an issue with one of the MySQL databases from one of the sites that I manage. I&#8217;m used to going about my merry way with phpMyAdmin and it&#8217;s trusty (?) export table feature but that is no longer an option with this Database.</p><p>It&#8217;s a Wordpress Mu (Multi-user) site that has well over 5,000 MySQL Database tables in it. PhpMyAdmin just could not handle an export of that size and timed out on me over and over again.</p><p><strong>It&#8217;s time for some command line action!</strong></p><p>So I loged into my server via SSH and entered in the mysqldump command only to be greeted by</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump: Got error: <span style="color: #000000;">1016</span>: Can<span style="color: #ff0000;">'t open file: '</span>.<span style="color: #000000; font-weight: bold;">/</span>databasename<span style="color: #000000; font-weight: bold;">/</span>table.frm<span style="color: #ff0000;">' (errno: 24) when using LOCK TABLES</span></pre></div></div><p>Great!</p><p>So after some searching I found that this is a bug in MySQL and to get around it and dump (not Drop!) a large database I needed to use the following in my mysqldump command : &#8211;lock-tables=false.</p><p>So my final MySQL command looked like this</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mysqldump --add-drop-table -h 127.0.0.1 -u MyUsername -pMyPassword MyDatabase --lock-tables=false | gzip &gt; backup.bak.sql.gz</span></pre></div></div><p>I hope this helps someone else.</p><p>If there is a problem with the way I&#8217;m going about this please let me know of a better solution!</p> ]]></content:encoded> <wfw:commentRss>http://jamielesouef.com/linux/tip-backing-up-a-large-mysql-database-errno-24/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching using disk

Served from: jamielesouef.com @ 2010-09-10 04:11:24 -->