<?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>Racker Hacker &#187; database</title>
	<atom:link href="http://rackerhacker.com/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Fri, 03 Feb 2012 04:29:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySQLTuner mentioned at the O&#039;Reilly MySQL Conference</title>
		<link>http://rackerhacker.com/2011/04/15/mysqltuner-mentioned-at-the-oreilly-mysql-conference/</link>
		<comments>http://rackerhacker.com/2011/04/15/mysqltuner-mentioned-at-the-oreilly-mysql-conference/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 01:56:31 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2271</guid>
		<description><![CDATA[If you push play, the video should scoot out to about the 14m40s mark where MySQLTuner appears on one of the slides. Thanks to Trent Hornibrook for letting me know! MySQLTuner mentioned at the O'Reilly MySQL Conference is a post from: Major Hayden's Racker Hacker blog. Thanks for following the blog via the RSS feed. [...]<p><a href="http://rackerhacker.com/2011/04/15/mysqltuner-mentioned-at-the-oreilly-mysql-conference/">MySQLTuner mentioned at the O'Reilly MySQL Conference</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><iframe title="YouTube video player" width="560" height="349" src="http://www.youtube.com/embed/L1V5T5rknq0?rel=0#t=14m40s" frameborder="0" allowfullscreen></iframe></p>
<p>If you push play, the video should scoot out to about the 14m40s mark where MySQLTuner appears on one of the slides.  Thanks to <a href="http://twitter.com/#!/trenthornibrook">Trent Hornibrook</a> for letting me know!</p>
<p><a href="http://rackerhacker.com/2011/04/15/mysqltuner-mentioned-at-the-oreilly-mysql-conference/">MySQLTuner mentioned at the O'Reilly MySQL Conference</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/04/15/mysqltuner-mentioned-at-the-oreilly-mysql-conference/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Monitor MySQL restore progress with pv</title>
		<link>http://rackerhacker.com/2010/11/24/monitor-mysql-restore-progress-with-pv/</link>
		<comments>http://rackerhacker.com/2010/11/24/monitor-mysql-restore-progress-with-pv/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 16:43:28 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[emergency]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1951</guid>
		<description><![CDATA[The pv command is one that I really enjoy using but it's also one that I often forget about. You can't get a much more concise definition of what pv does than this one: pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage [...]<p><a href="http://rackerhacker.com/2010/11/24/monitor-mysql-restore-progress-with-pv/">Monitor MySQL restore progress with pv</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://linux.die.net/man/1/pv">pv</a> command is one that I really enjoy using but it's also one that I often forget about.  You can't get a much more concise definition of what pv does than this one:</p>
<blockquote><p>pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA.</p></blockquote>
<p>The usage certainly isn't complicated:</p>
<blockquote><p>To use it, insert it in a pipeline between two processes, with the appropriate options. Its standard input will be passed through to its standard output and progress will be shown on standard error.</p></blockquote>
<p>A great application of pv is when you're restoring large amounts of data into MySQL, especially if you're restoring data under duress due to an accidentally-dropped table or database.  (Who hasn't been there before?)  The standard way of restoring data is something we're all familiar with:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># mysql my_database &lt; database_backup.sql</pre></div></div>

<p>The downside of this method is that you have no idea how quickly your restore is working or when it might be done.  You could always open another terminal to monitor the tables and databases as they're created, but that can be hard to follow.</p>
<p>Toss in pv and that problem is solved:
</pre>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># pv database_backup.sql | mysql my_database
96.8MB 0:00:17 [5.51MB/s] [==&gt;                                ] 11% ETA 0:02:10</pre></div></div>

<p>When it comes to MySQL, your restore rate is going to be different based on some different factors, so the ETA might not be entirely accurate.</p>
<p><a href="http://rackerhacker.com/2010/11/24/monitor-mysql-restore-progress-with-pv/">Monitor MySQL restore progress with pv</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/11/24/monitor-mysql-restore-progress-with-pv/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A simple guide to redundant cloud hosting</title>
		<link>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/</link>
		<comments>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 00:41:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cloud servers]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1771</guid>
		<description><![CDATA[Today, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago. I've written a guide on how to host a web application redundantly in a cloud environment. While it's still a bit of a rough draft, it should be a good starting point for those [...]<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Today, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago.  I've <a href="/redundant-cloud-hosting-configuration-guide/">written a guide</a> on how to host a web application redundantly in a cloud environment.  While it's still a bit of a rough draft, it should be a good starting point for those who haven't worked in virtualized environments before.  Also, it may show some of the more experienced systems administrators a new way to do things.</p>
<p>The guide: <a href="/redundant-cloud-hosting-configuration-guide/">Redundant Cloud Hosting Guide</a></p>
<p>As always, if you find anything in the guide that needs improvement, I'm all ears. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL: The total number of locks exceeds the lock table size</title>
		<link>http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/</link>
		<comments>http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 18:00:29 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1173</guid>
		<description><![CDATA[If you're running an operation on a large number of rows within a table that uses the InnoDB storage engine, you might see this error: ERROR 1206 (HY000): The total number of locks exceeds the lock table size MySQL is trying to tell you that it doesn't have enough room to store all of the [...]<p><a href="http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/">MySQL: The total number of locks exceeds the lock table size</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you're running an operation on a large number of rows within a table that uses the InnoDB storage engine, you might see this error:</p>
<p><code>ERROR 1206 (HY000): The total number of locks exceeds the lock table size</code></p>
<p>MySQL is trying to tell you that it doesn't have enough room to store all of the row locks that it would need to execute your query.  The only way to fix it for sure is to adjust <code>innodb_buffer_pool_size</code> and restart MySQL.  By default, this is set to only 8MB, which is too small for anyone who is using InnoDB to do anything.</p>
<p><strong>If you need a temporary workaround,</strong> reduce the amount of rows you're manipulating in one query.  For example, if you need to delete a million rows from a table, try to delete the records in chunks of 50,000 or 100,000 rows.  If you're inserting many rows, try to insert portions of the data at a single time.</p>
<p>Further reading:</p>
<ul>
<li><a href="http://bugs.mysql.com/bug.php?id=15667">MySQL Bug #15667 - The total number of locks exceeds the lock table size</a></li>
<li><a href="http://mrothouse.wordpress.com/2006/10/20/mysql-error-1206/">MySQL Error 1206 &raquo; Mike R's Blog</a></li>
</ul>
<p><a href="http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/">MySQL: The total number of locks exceeds the lock table size</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MySQL: The total number of locks exceeds the lock table size</title>
		<link>http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/</link>
		<comments>http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 13:12:21 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1156</guid>
		<description><![CDATA[This problem has cropped up for me a few times, but I've always forgotten to make a post about it. If you're working with a large InnoDB table and you're updating, inserting, or deleting a large volume of rows, you may stumble upon this error: ERROR 1206 (HY000): The total number of locks exceeds the [...]<p><a href="http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/">MySQL: The total number of locks exceeds the lock table size</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>This problem has cropped up for me a few times, but I've always forgotten to make a post about it.  If you're working with a large InnoDB table and you're updating, inserting, or deleting a large volume of rows, you may stumble upon this error:</p>
<p><code>ERROR 1206 (HY000): The total number of locks exceeds the lock table size</code></p>
<p>InnoDB stores its lock tables in the main buffer pool.  This means that the number of locks you can have at the same time is limited by the <code>innodb_buffer_pool_size</code> variable that was set when MySQL was started.  By default, MySQL leaves this at 8MB, which is pretty useless if you're doing anything with InnoDB on your server.</p>
<p>Luckily, the fix for this issue is very easy: adjust <code>innodb_buffer_pool_size</code> to a more reasonable value.  However, that fix does require a restart of the MySQL daemon.  There's simply no way to adjust this variable on the fly (with the current stable MySQL versions as of this post's writing).</p>
<p>Before you adjust the variable, make sure that your server can handle the additional memory usage.  The <code>innodb_buffer_pool_size</code> variable is a server wide variable, not a per-thread variable, so it's shared between all of the connections to the MySQL server (like the query cache).  If you set it to something like 1GB, MySQL won't use all of that up front.  As MySQL finds more things to put in the buffer, the memory usage will gradually increase until it reaches 1GB.  At that point, the oldest and least used data begins to get pruned when new data needs to be present.</p>
<p><strong>So, you need a workaround without a MySQL restart?</strong></p>
<p>If you're in a pinch, and you need a workaround, break up your statements into chunks.  If you need to delete a million rows, try deleting 5-10% of those rows per transaction.  This may allow you to sneak under the lock table size limitations and clear out some data without restarting MySQL.</p>
<p>To learn more about InnoDB's parameters, visit the <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html">MySQL documentation</a>.</p>
<p><a href="http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/">MySQL: The total number of locks exceeds the lock table size</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ugly upgrade path from WordPress 2.7.1 to 2.8</title>
		<link>http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/</link>
		<comments>http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 17:48:15 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=909</guid>
		<description><![CDATA[When I tried to do an automatic upgrade from WordPress 2.7.1 to 2.8 yesterday, it failed miserably. The files were all put in place, but when I tried to load /wp-admin/upgrade.php, this error popped up: Fatal error: Call to undefined method wpdb::has_cap() in /path/to/wordpress/wp-admin/includes/schema.php on line 22 I was perplexed at the error, so I [...]<p><a href="http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/">Ugly upgrade path from WordPress 2.7.1 to 2.8</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>When I tried to do an automatic upgrade from WordPress 2.7.1 to 2.8 yesterday, it failed miserably.  The files were all put in place, but when I tried to load <code>/wp-admin/upgrade.php</code>, this error popped up:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Fatal error: Call to undefined method wpdb::has_cap() in 
/path/to/wordpress/wp-admin/includes/schema.php on line 22</pre></div></div>

<p>I was perplexed at the error, so I restored from a backup and began <a href="http://codex.wordpress.org/Upgrading_WordPress">upgrading manually</a>.  The manual upgrades have always worked well for me in the past, so I figured this would probably fix the problem.  After the upgrade, I went to <code>/wp-admin/upgrade.php</code> and saw:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Fatal error: Call to undefined method wpdb::has_cap() in 
/path/to/wordpress/wp-admin/includes/schema.php on line 22</pre></div></div>

<p><strong>What the heck is going on?</strong>  I restored from a backup, tried the manual upgrade again, and it still failed.  I took a look at the lines causing the problem in <code>schema.php</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">has_cap</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'collation'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">charset</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;DEFAULT CHARACTER SET <span style="color: #006699; font-weight: bold;">$wpdb-&gt;charset</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">collate</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; COLLATE <span style="color: #006699; font-weight: bold;">$wpdb-&gt;collate</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I figured I could comment out the if statement and probably still be safe:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// if ( $wpdb-&gt;has_cap( 'collation' ) ) {</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">charset</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;DEFAULT CHARACTER SET <span style="color: #006699; font-weight: bold;">$wpdb-&gt;charset</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">collate</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$charset_collate</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; COLLATE <span style="color: #006699; font-weight: bold;">$wpdb-&gt;collate</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// }</span></pre></div></div>

<p><strong>Success?</strong>  I could make it through the <code>upgrade.php</code> part fine at this point, but whenever I tried to add a tag to a post, it wasn't saving to the database.  I caught this error in my apache logs:</p>
<p><code>[Fri Jun 12 23:45:03 2009] [error] [client 72.183.200.144] WordPress database error Duplicate entry 'debian' for key 'slug' for query INSERT INTO wp_terms (`name`,`slug`,`term_group`) VALUES ('debian','debian','0') made by wp_insert_term, referer: http://rackerhacker.com/wp-admin/post.php?action=edit&#038;post=877</code></p>
<p><strong>Frustration quickly ensued.</strong>  I moved my <code>/wp-content/</code> folder out of the way and replaced it with the standard WordPress stuff, but that didn't help.  I moved plugins out of the way, one by one, but that didn't fix it either.  Then I spotted a strange file sitting in <code>/wp-content/</code> called <code>db.php</code>.  When I opened it, I found a <a href="http://pastie.org/private/rmbmk3ohgmdbujotnrg">lot of database setup classes for mysqli</a>.</p>
<p>I renamed it to <code>db.pleasedonteverrunthisphp</code> and I was able to save tags properly.  So far, I haven't found any issues after I made chat change.</p>
<p>Does anyone know where that file might have come from?  I don't remember adding it myself, so I'm wondering if it was ever packaged with a WordPress plugin or a WordPress installation.  I hope this helps someone else!</p>
<p><a href="http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/">Ugly upgrade path from WordPress 2.7.1 to 2.8</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/06/13/ugly-upgrade-path-from-wordpress-2-7-1-to-2-8/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>PHPMyAdmin 3.x hides the table indexes</title>
		<link>http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/</link>
		<comments>http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 00:51:48 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=835</guid>
		<description><![CDATA[Users of PHPMyAdmin 3.x may find that the table indexes are automatically hidden at the bottom of the page. I find this to be a huge annoyance since table indexes are tremendously important to the structure of the table. If you don't want to downgrade to PHPMyAdmin 2.x, just add the following line to the [...]<p><a href="http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/">PHPMyAdmin 3.x hides the table indexes</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Users of PHPMyAdmin 3.x may find that the table indexes are automatically hidden at the bottom of the page.  I find this to be a huge annoyance since table indexes are tremendously important to the structure of the table.</p>
<p>If you don't want to downgrade to PHPMyAdmin 2.x, just add the following line to the top of your config.inc.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cfg</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'InitialSlidersState'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'open'</span><span style="color: #339933;">;</span></pre></div></div>

<p>This will cause the indexes to be displayed when you click <strong>Structure</strong> for a certain table.  By default, they are hidden.</p>
<p><em><strong>Sidenote:</strong> Some of you might be thinking: "Hey, you're a DBA, you should know MySQL queries without needing PHPMyAdmin."  You're right.  I do know how to get the job done without PHPMyAdmin, but I enjoy the way PHPMyAdmin allows me to visualize my table structures.  Also, it's a handy way to present data to others very quickly.</em></p>
<p><a href="http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/">PHPMyAdmin 3.x hides the table indexes</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/04/03/phpmyadmin-3x-hides-the-table-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL performance flow chart</title>
		<link>http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/</link>
		<comments>http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 17:00:29 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=756</guid>
		<description><![CDATA[As much as some people might disagree, optimizing MySQL isn't rocket science. There are some basic steps that every server administrator can follow to improve the performance of their MySQL server. I've outlined these steps in the flow chart included in this post. While it won't include all situations, it will give ideas to those [...]<p><a href="http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/">MySQL performance flow chart</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://cdn.cloudfiles.mosso.com/c8031/improvingmysqlperformance.pdf"><img alt="" src="http://cdn.cloudfiles.mosso.com/c8031/improvingmysqlperformance.jpg" title="Improving MySQL Performance flow chart" class="alignright" width="306" height="240" /></a><br />
As much as some people might disagree, optimizing MySQL isn't rocket science.  There are some basic steps that every server administrator can follow to improve the performance of their MySQL server.  I've outlined these steps in the flow chart included in this post.</p>
<p>While it won't include all situations, it will give ideas to those who are just starting down the path of MySQL optimization.  If you find any corrections or if you have suggestions for improvements, please let me know!</p>
<p><strong>UPDATE:</strong> I've received a lot of positive feedback via twitter and e-mail about the flow chart idea.  I'll try to work on some more charts soon and get them onto the site.  Let me know if there are specific topics that you're interested in.</p>
<p><a href="http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/">MySQL performance flow chart</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/04/mysql-performance-flow-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a Ruby on Rails application without using a database</title>
		<link>http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/</link>
		<comments>http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 17:00:44 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=687</guid>
		<description><![CDATA[Some of you may be wondering "why would you want to use Rails without a database?" There are several situations why a database would not be needed, and I've run into quite a few of them. One of the specific cases was when I wanted to write a web interface for an application that only [...]<p><a href="http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/">Writing a Ruby on Rails application without using a database</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Some of you may be wondering "why would you want to use Rails without a database?"  There are several situations why a database would not be needed, and I've run into quite a few of them.  One of the specific cases was when I wanted to write a web interface for an application that only had a REST interface available to the public.</p>
<p>If you find yourself needing to write a Rails application without a database, just do the following:</p>
<p><strong>For Rails 1.0 and up:</strong><br />
<code>config/environment.rb</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">config.<span style="color:#9900CC;">frameworks</span> <span style="color:#006600; font-weight:bold;">-</span>= <span style="color:#006600; font-weight:bold;">&#91;</span> <span style="color:#ff3333; font-weight:bold;">:active_record</span> <span style="color:#006600; font-weight:bold;">&#93;</span></pre></div></div>

<p><code>test/test_helper.rb</code></p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC00FF; font-weight:bold;"><span style="color:#6666ff; font-weight:bold;">Test::Unit::TestCase</span></span>
  <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">use_transactional_fixtures</span> = <span style="color:#0000FF; font-weight:bold;">false</span>
  <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">use_instantiated_fixtures</span>  = <span style="color:#0000FF; font-weight:bold;">false</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> load_fixtures
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p><strong>For Rails 2.1 and up:</strong> Comment out both of the lines that begin with  <code>ActiveRecord::Base</code> in <code>config/initializers/new_rails_defaults.rb</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">defined</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>ActiveRecord<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#008000; font-style:italic;"># Include Active Record class name as root for JSON serialized output.</span>
  <span style="color:#008000; font-style:italic;"># ActiveRecord::Base.include_root_in_json = true</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Store the full class name (including module namespace) in STI type column.</span>
  <span style="color:#008000; font-style:italic;"># ActiveRecord::Base.store_full_sti_class = true</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>For more details, review the <a href="http://wiki.rubyonrails.org/rails/pages/HowToUseRailsWithoutADatabase">full article</a> on <a href="http://rubyonrails.org">rubyonrails.org</a>.</p>
<p><a href="http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/">Writing a Ruby on Rails application without using a database</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/01/09/writing-a-ruby-on-rails-application-without-using-a-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQLTuner 1.0.0 is now available</title>
		<link>http://rackerhacker.com/2008/12/01/mysqltuner-100-is-now-available/</link>
		<comments>http://rackerhacker.com/2008/12/01/mysqltuner-100-is-now-available/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 00:31:43 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=622</guid>
		<description><![CDATA[It has finally arrived. MySQLTuner 1.0.0 is now available for download. Major improvements include full support for MySQL 5.1 and Solaris. You can review other changes in the changelog. As always, I'd like to personally thank everyone who has made this release possible. Your efforts have provided benefits from MySQL users worldwide, and they have [...]<p><a href="http://rackerhacker.com/2008/12/01/mysqltuner-100-is-now-available/">MySQLTuner 1.0.0 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It has finally arrived.  MySQLTuner 1.0.0 is now available for <a href="http://mysqltuner.pl/">download</a>.  Major improvements include full support for MySQL 5.1 and Solaris.  You can review other changes in the <a href="http://wiki.mysqltuner.com/Changelog">changelog</a>.</p>
<p>As always, I'd like to personally thank everyone who has made this release possible.  Your efforts have provided benefits from MySQL users worldwide, and they have shown me how rewarding it is to maintain open source software.</p>
<p><a href="http://rackerhacker.com/2008/12/01/mysqltuner-100-is-now-available/">MySQLTuner 1.0.0 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/12/01/mysqltuner-100-is-now-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQLTuner 0.9.9 is now available</title>
		<link>http://rackerhacker.com/2008/09/07/mysqltuner-099-is-now-available/</link>
		<comments>http://rackerhacker.com/2008/09/07/mysqltuner-099-is-now-available/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 02:05:03 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=421</guid>
		<description><![CDATA[MySQLTuner 0.9.9 is now available for download. There's a new wiki for the script at wiki.mysqltuner.com. The new wiki contains links to downloads, changelogs, and other details. If you want to know when the latest releases are available, there are multiple options: Follow RackerHacker on Twitter Sign up for the MySQLTuner mailing list Use the [...]<p><a href="http://rackerhacker.com/2008/09/07/mysqltuner-099-is-now-available/">MySQLTuner 0.9.9 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>MySQLTuner 0.9.9 is now available for <a href="http://mysqltuner.pl/">download</a>.  There's a new wiki for the script at <a href="http://wiki.mysqltuner.com">wiki.mysqltuner.com</a>.  The new wiki contains links to downloads, changelogs, and other details.</p>
<p>If you want to know when the latest releases are available, there are multiple options:</p>
<ul>
<li>Follow <a href="http://twitter.com/RackerHacker/">RackerHacker</a> on <a href="http://twitter.com/">Twitter</a></li>
<li>Sign up for the <a href="http://wiki.mysqltuner.com/MySQLTuner#Mailing_List">MySQLTuner mailing list</a></li>
<li>Use the <code>--checkversion</code> option when you run the script</li>
</ul>
<p><a href="http://rackerhacker.com/2008/09/07/mysqltuner-099-is-now-available/">MySQLTuner 0.9.9 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/09/07/mysqltuner-099-is-now-available/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQLTuner 0.9.8 is now available</title>
		<link>http://rackerhacker.com/2008/07/21/mysqltuner-098-is-now-available/</link>
		<comments>http://rackerhacker.com/2008/07/21/mysqltuner-098-is-now-available/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 17:17:14 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=336</guid>
		<description><![CDATA[MySQLTuner 0.9.8 is now available for download and it is full of new changes! So far, MySQLTuner has been downloaded almost 24,000 times. Thanks for making it so popular. Easy download! You can download it simply by running wget mysqltuner.pl. You will automatically be redirected to the script. Access servers remotely If you have multiple [...]<p><a href="http://rackerhacker.com/2008/07/21/mysqltuner-098-is-now-available/">MySQLTuner 0.9.8 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>MySQLTuner 0.9.8 is now available for <a href="http://rackerhacker.com/mysqltuner/">download</a> and it is full of new changes!  So far, MySQLTuner has been downloaded almost 24,000 times.  Thanks for making it so popular.</p>
<p><strong>Easy download!</strong><br />
You can download it simply by running <code>wget mysqltuner.pl</code>.  You will automatically be redirected to the script.</p>
<p><strong>Access servers remotely</strong><br />
If you have multiple servers that you need to tune and monitor, simply download MySQLTuner onto one machine.  You can run it against other servers by specifying a hostname, port, and login credentials.  Two new options are available: <code>--host</code> and <code>--port</code>.</p>
<p><strong>Pass login credentials on the command line</strong><br />
Two new options are available: <code>--user</code> and <code>--pass</code>.  You can pass a username and password on the command line to log in quickly.  This can be especially helpful in conjunction with cron.</p>
<p><strong>Manually set the amount of RAM and swap memory installed</strong><br />
I've received a few bug reports where users on certain virtual environments saw incorrect memory calculations when they ran MySQLTuner.  You can now set the current amount of RAM and swap memory installed with <code>--forcemem</code> and <code>--forceswap</code> respectively.  (Thanks to Jason Gill for the patch and the bug report!)</p>
<p><strong>Checking for updates is now optional</strong><br />
Some operating system distributions and environments can't allow for automatic update checking due to security concerns, so I've made update checks optional.  The <code>--skipversion</code> option has been removed and it was replaced with <code>--checkversion</code>.  <em>As a side note, the only data that I collected was the version number being run and the IP from which the update originated.  This data has only been used for aggregate statistical purposes.</em></p>
<p>As you might imagine, MySQLTuner 1.0 is just around the corner.  I've been holding out for the MySQL 5.1 GA release, but I may release the script sooner.  Don't worry - as soon as MySQL 5.1 becomes a GA release, I'll be hard at work to support any new optimization options which it provides.</p>
<p><a href="http://rackerhacker.com/2008/07/21/mysqltuner-098-is-now-available/">MySQLTuner 0.9.8 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/07/21/mysqltuner-098-is-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLTuner is now a Fedora 9 package!</title>
		<link>http://rackerhacker.com/2008/06/27/mysqltuner-is-now-a-fedora-9-package/</link>
		<comments>http://rackerhacker.com/2008/06/27/mysqltuner-is-now-a-fedora-9-package/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:16:56 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=317</guid>
		<description><![CDATA[Thanks to some work started by Ville Skyttä, MySQLTuner is now included in Fedora 9 repositories: # cat /etc/fedora-release Fedora release 9 (Sulphur) # yum info mysqltuner Loaded plugins: fastestmirror, priorities, refresh-packagekit Loading mirror speeds from cached hostfile * updates: mirrors.usc.edu * fedora: mirror.unl.edu * livna: mirrors.tummy.com Available Packages Name : mysqltuner Arch : noarch [...]<p><a href="http://rackerhacker.com/2008/06/27/mysqltuner-is-now-a-fedora-9-package/">MySQLTuner is now a Fedora 9 package!</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="https://bugzilla.redhat.com/show_bug.cgi?id=452172">some work started by Ville Skyttä</a>, MySQLTuner is now included in Fedora 9 repositories:</p>
<p><code># cat /etc/fedora-release<br />
Fedora release 9 (Sulphur)<br />
# yum info mysqltuner<br />
Loaded plugins: fastestmirror, priorities, refresh-packagekit<br />
Loading mirror speeds from cached hostfile<br />
 * updates: mirrors.usc.edu<br />
 * fedora: mirror.unl.edu<br />
 * livna: mirrors.tummy.com<br />
Available Packages<br />
Name       : mysqltuner<br />
Arch       : noarch<br />
Version    : 0.9.1<br />
Release    : 4<br />
Size       : 11 k<br />
Repo       : updates<br />
Summary    : MySQL high performance tuning script<br />
URL        : http://mysqltuner.com/<br />
License    : GPLv3+<br />
Description: MySQLTuner is a MySQL high performance tuning script written in perl that will provide you with a snapshot of a MySQL server's health. Based<br />
           : on the statistics gathered, specific recommendations will be provided that will increase a MySQL server's efficiency and performance.  The<br />
           : script gives you automated MySQL tuning that is on the level of what you would receive from a MySQL DBA.</code></p>
<p>In addition to Ville, I'd like to thank Jason Tibbitts for reviewing and approving the new package.</p>
<p><a href="http://rackerhacker.com/2008/06/27/mysqltuner-is-now-a-fedora-9-package/">MySQLTuner is now a Fedora 9 package!</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/06/27/mysqltuner-is-now-a-fedora-9-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLTuner 0.9.1 available for Mandriva users</title>
		<link>http://rackerhacker.com/2008/06/21/mysqltuner-091-available-for-mandriva-users/</link>
		<comments>http://rackerhacker.com/2008/06/21/mysqltuner-091-available-for-mandriva-users/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 02:54:03 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mandriva]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=314</guid>
		<description><![CDATA[Thanks to some hard work from Oden Eriksson and Frederik Himpe, MySQLTuner 0.9.1 is available in a Mandriva package. MySQLTuner 0.9.1 available for Mandriva users is a post from: Major Hayden's Racker Hacker blog. Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.<p><a href="http://rackerhacker.com/2008/06/21/mysqltuner-091-available-for-mandriva-users/">MySQLTuner 0.9.1 available for Mandriva users</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Thanks to some hard work from Oden Eriksson and Frederik Himpe, MySQLTuner 0.9.1 is available in a <a href="http://rpmfind.net/linux/RPM/mandriva/devel/cooker/i586/media/contrib/release/mysqltuner-0.9.1-1mdv2009.0.noarch.html">Mandriva package</a>.</p>
<p><a href="http://rackerhacker.com/2008/06/21/mysqltuner-091-available-for-mandriva-users/">MySQLTuner 0.9.1 available for Mandriva users</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/06/21/mysqltuner-091-available-for-mandriva-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLTuner v0.9.1 is now available</title>
		<link>http://rackerhacker.com/2008/06/18/mysqltuner-v091-is-now-available/</link>
		<comments>http://rackerhacker.com/2008/06/18/mysqltuner-v091-is-now-available/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 02:53:58 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=312</guid>
		<description><![CDATA[MySQLTuner v0.9.1 is now available! This long-awaited update includes bug fixes, feature enhancements, and compatibility improvements. MySQLTuner now checks for fragmented tables When deletes or updates are made on tables, MySQL will often leave holes behind that it hopes to fill in later. If the size and quantity keep climbing, the holes can cause performance [...]<p><a href="http://rackerhacker.com/2008/06/18/mysqltuner-v091-is-now-available/">MySQLTuner v0.9.1 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>MySQLTuner v0.9.1 is <a href="http://rackerhacker.com/mysqltuner/">now available</a>!  This long-awaited update includes bug fixes, feature enhancements, and compatibility improvements.</p>
<p><strong>MySQLTuner now checks for fragmented tables</strong><br />
When deletes or updates are made on tables, MySQL will often leave holes behind that it hopes to fill in later.  If the size and quantity keep climbing, the holes can cause performance degradation for writes and reads.  Fragmentation can be corrected with <code>OPTIMIZE TABLE</code>, and the script recommends it if needed.</p>
<p><strong>Fixed a bug where zero-length passwords cause authentication to repeat</strong><br />
The script will now allow you to have a zero-length password, and it won't re-prompt for the password over and over again.</p>
<p><strong>Fixed a wget 1.11 timestamp bug</strong><br />
This can cause the version check to fail if the .wgetrc has timestamps enabled.</p>
<p><strong>Corrected a math error in the temporary table calculation</strong><br />
The script should now be able to more accurately determine the relative quantity of temporary tables created on disk.</p>
<p><strong>Fixed an error when the status variable <code>Open_tables</code> returned zero</strong><br />
The divide by zero error has been corrected.</p>
<p><strong>Added table cache changes in preparation for MySQL 6</strong><br />
It's still in the early stages, but MySQLTuner should have full support for MySQL 6 by the time it reaches RC status.</p>
<p><strong>Thanks for the contributions!</strong><br />
This update would not have been possible without help from Ville Skytta, Trent Hornibrook and Luuk Vosslamber.</p>
<p>To download the latest copy, visit the <a href="http://rackerhacker.com/mysqltuner/">MySQLTuner page</a>.</p>
<p><a href="http://rackerhacker.com/2008/06/18/mysqltuner-v091-is-now-available/">MySQLTuner v0.9.1 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/06/18/mysqltuner-v091-is-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screencast: Write a PHP script to query MySQL</title>
		<link>http://rackerhacker.com/2008/06/04/screencast-write-a-php-script-to-query-mysql/</link>
		<comments>http://rackerhacker.com/2008/06/04/screencast-write-a-php-script-to-query-mysql/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 21:15:43 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[screencasts]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=305</guid>
		<description><![CDATA[I've discovered one of the most awesome applications for a Mac called ScreenFlow (#3 on my list after #1 TextMate and #2 Adium and I decided to put it to use for my first screencast. This screencast will teach you how to write a basic PHP script that will query data in MySQL. It is [...]<p><a href="http://rackerhacker.com/2008/06/04/screencast-write-a-php-script-to-query-mysql/">Screencast: Write a PHP script to query MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300" class="alignright"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1178187&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1178187&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="250"></embed></object></p>
<p>I've discovered one of the most awesome applications for a Mac called <a href="http://www.varasoftware.com/products/screenflow/">ScreenFlow</a> (#3 on my list after #1 <a href="http://macromates.com/">TextMate</a> and #2 <a href="http://adiumx.com/">Adium</a> and I decided to put it to use for my first screencast.</p>
<p>This screencast will teach you how to write a basic PHP script that will query data in MySQL.  It is designed for users who are familiar with Linux but are just getting started with PHP.  Here are the basic parts of the screencast:</p>
<p>» Import a MySQL dump file<br />
» Connect to MySQL with PHP<br />
» Select a default database<br />
» Issue a query and retrieve results<br />
» Style the rows retrieved into a table with alternating row colors</p>
<p><a href="http://cdn.cloudfiles.mosso.com/c8031/PHPandMySQL.mov">Download the screencast in Quicktime format (80.9MB)</a></p>
<p><strong>NEW:</strong> <a href="http://vimeo.com/1178187">Uploaded the video to Vimeo as well.</a></p>
<p>As always, your comments are welcome.  This is my first screencast, and I'm sure I can make some improvements on future videos.  Please let me know what I can change to make these screencasts better for you.</p>
<p><a href="http://rackerhacker.com/2008/06/04/screencast-write-a-php-script-to-query-mysql/">Screencast: Write a PHP script to query MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/06/04/screencast-write-a-php-script-to-query-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://rackerhacker.com/wp-content/screencasts/PHPandMySQL.mov" length="84839968" type="video/quicktime" />
		</item>
		<item>
		<title>MySQLTuner is the Debian Package of the Day!</title>
		<link>http://rackerhacker.com/2008/05/28/mysqltuner-is-the-debian-package-of-the-day/</link>
		<comments>http://rackerhacker.com/2008/05/28/mysqltuner-is-the-debian-package-of-the-day/#comments</comments>
		<pubDate>Thu, 29 May 2008 02:23:30 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=302</guid>
		<description><![CDATA[I just received a Google Alert about MySQLTuner being the Debian Package of the Day! MySQLTuner is the Debian Package of the Day! is a post from: Major Hayden's Racker Hacker blog. Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.<p><a href="http://rackerhacker.com/2008/05/28/mysqltuner-is-the-debian-package-of-the-day/">MySQLTuner is the Debian Package of the Day!</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I just received a <a href="http://google.com/alerts">Google Alert</a> about MySQLTuner being the <a href="http://potd.redsymbol.net/?p=mysqltuner">Debian Package of the Day</a>!</p>
<p><a href="http://rackerhacker.com/2008/05/28/mysqltuner-is-the-debian-package-of-the-day/">MySQLTuner is the Debian Package of the Day!</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/05/28/mysqltuner-is-the-debian-package-of-the-day/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>After Plesk upgrade, &quot;Cannot initialize InnoDB&quot;</title>
		<link>http://rackerhacker.com/2008/05/01/after-plesk-upgrade-cannot-initialize-innodb/</link>
		<comments>http://rackerhacker.com/2008/05/01/after-plesk-upgrade-cannot-initialize-innodb/#comments</comments>
		<pubDate>Thu, 01 May 2008 17:00:09 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[plesk]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=297</guid>
		<description><![CDATA[Upgrading Plesk from 7.5.x to 8.x will change your Plesk-related MySQL tables from MyISAM to InnoDB. This allows for better concurrency in the Plesk panel when a lot of users are logged in simultaneously. However, some server administrators will disable InnoDB support in MySQL to save resources. This will cause problems after the upgrade. Plesk [...]<p><a href="http://rackerhacker.com/2008/05/01/after-plesk-upgrade-cannot-initialize-innodb/">After Plesk upgrade, "Cannot initialize InnoDB"</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Upgrading Plesk from 7.5.x to 8.x will change your Plesk-related MySQL tables from MyISAM to InnoDB.  This allows for better concurrency in the Plesk panel when a lot of users are logged in simultaneously.  However, some server administrators will disable InnoDB support in MySQL to save resources.  This will cause problems after the upgrade.</p>
<p>Plesk may display an error on a white page that looks something like:</p>
<blockquote><p>Cannot initialize InnoDB</p></blockquote>
<p>This could mean that InnoDB support was disabled when MySQL was started.  To correct this issue, search through the /etc/my.cnf for this line:</p>
<p><code>skip-innodb</code></p>
<p>If you find it in your configuration, remove it, and then restart MySQL.  To test that InnoDB is enabled, you can refresh the Plesk page, or you can log into MySQL and run <code>SHOW ENGINES</code>.  The output from the <code>SHOW ENGINES</code> statement should show <strong>YES</strong> on the line with InnoDB.</p>
<p>Should <strong>DISABLED</strong> appear instead, you may have an issue with your InnoDB configuration in your /etc/my.cnf.  Be sure to check for innodb_data_file_path and make sure that it is set to an appropriate value.</p>
<p>A value of <strong>NO</strong> is not a good sign.  This means that your version of MySQL was compiled without InnoDB support.  This means that it cannot be enabled at runtime because MySQL wasn't built with any support for InnoDB.  Be sure to recompile MySQL with <code>--with-innodb</code> or obtain a new package for your operating system which includes InnoDB support.</p>
<p>If you suspect that your MySQL InnoDB configuration is incorrect, you may want to review this documentation on MySQL's site:</p>
<p>For MySQL 5: <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html">13.2.3. InnoDB Configuration</a><br />
For MySQL 4/3.23: <a href="http://dev.mysql.com/doc/refman/4.1/en/innodb-configuration.html">13.2.4. InnoDB Configuration</a></p>
<p><a href="http://rackerhacker.com/2008/05/01/after-plesk-upgrade-cannot-initialize-innodb/">After Plesk upgrade, "Cannot initialize InnoDB"</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/05/01/after-plesk-upgrade-cannot-initialize-innodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proposed MySQL DBA Screencasts</title>
		<link>http://rackerhacker.com/2008/04/30/proposed-mysql-dba-screencasts/</link>
		<comments>http://rackerhacker.com/2008/04/30/proposed-mysql-dba-screencasts/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 23:33:12 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=296</guid>
		<description><![CDATA[After running the idea by some of my fellow technical folks, I've considered making an array of screencasts aimed to prepare people for the MySQL DBA exam. I haven't decided to make them free or charge for them as of yet, but if I did charge a fee, it would be much less than getting [...]<p><a href="http://rackerhacker.com/2008/04/30/proposed-mysql-dba-screencasts/">Proposed MySQL DBA Screencasts</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>After running the idea by some of my fellow technical folks, I've considered making an array of screencasts aimed to prepare people for the MySQL DBA exam.  I haven't decided to make them free or charge for them as of yet, but if I did charge a fee, it would be much less than getting the training from MySQL ($2,499USD in most locations).</p>
<p><strong>So, I have two questions for the general techy community:</strong></p>
<p><strong>1.</strong> What tools/applications would you recommend on a Mac for making high-quality screencasts that have a professional feel?</p>
<p><strong>2.</strong> Would you pay for these screencasts (if they are really good), and if so, how much would you want to spend in total to get all of the screencasts for the DBA certification?</p>
<p>Feel free to add comments to this post, or you're welcome to drop me an e-mail at <em>major at mhtx dot net</em>.  Your feedback is greatly appreciated!</p>
<p><a href="http://rackerhacker.com/2008/04/30/proposed-mysql-dba-screencasts/">Proposed MySQL DBA Screencasts</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/04/30/proposed-mysql-dba-screencasts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Best PHP and MySQL development book</title>
		<link>http://rackerhacker.com/2008/04/29/best-php-and-mysql-development-book/</link>
		<comments>http://rackerhacker.com/2008/04/29/best-php-and-mysql-development-book/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 17:00:54 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=294</guid>
		<description><![CDATA[I finally remembered this book when someone asked me about how to get started with PHP and MySQL development. If you get the chance, get a copy of this book: PHP and MySQL Web Development by Luke Welling, Laura Thomson Barnes &#38; Noble: http://snurl.com/265xp Why do I like this book so much? Teaching by application [...]<p><a href="http://rackerhacker.com/2008/04/29/best-php-and-mysql-development-book/">Best PHP and MySQL development book</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I finally remembered this book when someone asked me about how to get started with PHP and MySQL development.  If you get the chance, get a copy of this book:</p>
<p><u>PHP and MySQL Web Development</u> <em>by Luke Welling, Laura Thomson</em><br />
Barnes &amp; Noble: <a href="http://snurl.com/265xp">http://snurl.com/265xp</a></p>
<p>Why do I like this book so much?</p>
<ul>
<li><strong>Teaching by application</strong> - The book teaches fundamentals by showing how to apply techniques to an active website.  There's not a ton of theory to wade through, and you feel like you're learning the material faster.</li>
<li><strong>Intertwined strategies</strong> - You learn how to get PHP working with MySQL, and then you learn how to optimize your code.  It's important to know which work is best done by PHP and which is best done by MySQL.  This book teaches both.</li>
<li><strong>Lots of examples</strong> - The CD-ROM comes with tons of code examples that actually relate to something you can use.</li>
</ul>
<p>I'd be happy to loan my copy, but I've loaned it out and it never returned.</p>
<p><a href="http://rackerhacker.com/2008/04/29/best-php-and-mysql-development-book/">Best PHP and MySQL development book</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/04/29/best-php-and-mysql-development-book/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Reducing locking delays in MySQL</title>
		<link>http://rackerhacker.com/2008/04/16/reducing-locking-delays-in-mysql/</link>
		<comments>http://rackerhacker.com/2008/04/16/reducing-locking-delays-in-mysql/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 17:32:50 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=290</guid>
		<description><![CDATA[Before getting started, it's important to understand why MySQL uses locks. In short - MySQL uses locks to prevent multiple clients from corrupting data due to simultaneous writes while also protecting clients from reading partially-written data. Some of you may be thinking, "Okay, this makes sense." If that's you, skip the next two paragraphs. If [...]<p><a href="http://rackerhacker.com/2008/04/16/reducing-locking-delays-in-mysql/">Reducing locking delays in MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Before getting started, it's important to understand why <a href="http://dev.mysql.com/">MySQL</a> uses <a href="http://dev.mysql.com/doc/refman/5.0/en/locking-issues.html">locks</a>.  In short - MySQL uses locks to prevent multiple clients from corrupting data due to simultaneous writes while also protecting clients from reading partially-written data.</p>
<p>Some of you may be thinking, "Okay, this makes sense."  If that's you, skip the next two paragraphs.  If not, keep reading.</p>
<p>Analogies can help understand topics like these.  Here's one that I came up with during a training class.  Consider two people sitting in front of a notepad on a table.  Let's say that a sentence like "The quick brown fox jumps over the lazy dog" is already written on the notepad.  If both people want to read the sentence simultaneously, they can do so without getting in each other's way.  A third or fourth person could show up and they could all read it at the same time.</p>
<p>Well, let's say one of the people at the table is writing a screenplay for <a href="http://www.imdb.com/title/tt0085382/">Cujo</a>, and they want to change "lazy" to "crazy".  That person erases the "l" in "lazy" and then adds a "cr" to the front to spell "crazy".  So if the other person is reading the sentence while the first person is writing, they will see "lazy" turn into "azy", then "c_azy", and then finally, "crazy".  This isn't a big issue in real life, but on the database level, this could be dangerous.  If the person who was reading the sentence showed up during the middle of the letter changes, they would think that the dog was "azy", and they'd walk away wondering what the adjective "azy" means.  To get around this, MySQL uses locking to block clients from reading data while it's being written and it blocks clients from writing data simultaneously.</p>
<p>Now that we're all familiar with what locks are, and why MySQL uses them, let's talk about some ways to reduce the delays caused by locking.  Here's some situations you might be running up against:</p>
<p><strong>Writes are delayed because reads have locked the tables</strong><br />
This is the most common occurrence from the servers that I have seen.  When you run a <code>SHOW PROCESSLIST</code>, you may see a few reads at the top of the queue that are in the status of "Copying to tmp table" and/or "Sending data".  On optimized servers running optimized queries, these should clear out quickly.  If you're finding that they are not clearing out quickly, try the following:</p>
<ul>
<li>Use <code>EXPLAIN</code> on your queries to be sure that they are optimized</li>
<li>Add indexes to tables that you query often</li>
<li>Reduce the amount of rows that are being returned per query</li>
<li>Upgrade the networking equipment between web and database servers (if applicable)</li>
<li>Consider faster hardware with larger amounts of RAM</li>
<li>Use <a href="http://rackerhacker.com/mysqltuner/">MySQLTuner</a> to check your current server's configuration for issues</li>
<li>Consider moving to InnoDB to utilize row-based locking</li>
</ul>
<p><strong>Reads and writes are delayed because writes have locked the tables</strong><br />
Situations like these are a little different.  There's two main factors to consider here: either MySQL cannot write data to the disk fast enough, or your write queries (or tables) are not optimized.  If you suspect a hardware issue, check your iowait with <code>sar</code> and see if it stays at about 10-20% or higher during the day.  If it does, slow hardware may be the culprit.  Try moving to SCSI disks and be sure to use RAID 5 or 10 for additional reliability and speed.  SAN or DAS units may also help due to higher throughput and more disk spindles.</p>
<p>If you already have state-of-the-art hardware, be sure that your tables and queries are optimized.  Run <code>OPTIMIZE TABLES</code> regularly if your data changes often to defragment the tables and clear out any holes from removed or updated data.  Slow <code>UPDATE</code> queries suggest that you are updating too many rows, or you may be using a column in the WHERE clause that is not indexed.  If you do a large amount of <code>INSERT</code> queries, use this syntax to enter multiple rows simultaneously:</p>
<p><code>INSERT INTO table (col1,col2) VALUES ('a','1'), ('b','2'), ('c','3');</code></p>
<p>This syntax tells MySQL to hold off on updating indexes until the entire query is complete.  If you are updating a <strong>very large</strong> amount of rows, and you need to use multiple queries to avoid reaching the <a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#option_mysqld_max_allowed_packet">max_allowed_packet</a> directive, you can do something like this:</p>
<p><code>ALTER TABLE table DISABLE KEYS;<br />
INSERT INTO table (col1,col2) VALUES ('a','1'), ('b','2'), ('c','3');<br />
~~~ many more inserts ~~~<br />
ALTER TABLE table ENABLE KEYS;</code></p>
<p>This forces MySQL to not calculate any new index information until you re-enable the keys or run <code>OPTIMIZE TABLE</code>.  If all of this does not help, consider using InnoDB as your storage engine.  You can benefit from the row-level locking, which reduces locking in mixed read/write scenarios.  In addition, InnoDB is able to write data much more efficiently than MyISAM.</p>
<p><a href="http://rackerhacker.com/2008/04/16/reducing-locking-delays-in-mysql/">Reducing locking delays in MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/04/16/reducing-locking-delays-in-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQLTuner v0.9.0 is now available</title>
		<link>http://rackerhacker.com/2008/04/06/mysqltuner-v090-is-now-available/</link>
		<comments>http://rackerhacker.com/2008/04/06/mysqltuner-v090-is-now-available/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 14:30:28 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=288</guid>
		<description><![CDATA[MySQLTuner v0.9.0 is now available. There is a bug fix and also a new feature! Fixed a bug in the enumeration/sizing of tables in MySQL 5 In MySQL 5 on some distributions, a NULL is returned for the storage engine and data length. Luuk Vosslamber quickly e-mailed me about the bug yesterday and it has [...]<p><a href="http://rackerhacker.com/2008/04/06/mysqltuner-v090-is-now-available/">MySQLTuner v0.9.0 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>MySQLTuner v0.9.0 is <a href="http://rackerhacker.com/mysqltuner/">now available</a>.  There is a bug fix and also a new feature!</p>
<p><strong>Fixed a bug in the enumeration/sizing of tables in MySQL 5</strong><br />
In MySQL 5 on some distributions, a NULL is returned for the storage engine and data length.  Luuk Vosslamber quickly e-mailed me about the bug yesterday and it has been fixed.</p>
<p><strong>MySQLTuner version checking</strong><br />
MySQLTuner will now check to see if a new version is available when the script runs.  You can disable the check with the <code>--skipversion</code> option if you do not wish to perform the check.</p>
<p>The version check does not submit any information about the server, the MySQL installation, or any of your MySQL data.  It simply queries a page on mysqltuner.com with the version number of your currently running script.  Based on the value returned by the page, MySQLTuner will alert you if a new version is available.</p>
<p>To download the new version right now, please go to the <a href="http://rackerhacker.com/mysqltuner/">project page </a>and use the download links.</p>
<p><a href="http://rackerhacker.com/2008/04/06/mysqltuner-v090-is-now-available/">MySQLTuner v0.9.0 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/04/06/mysqltuner-v090-is-now-available/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQLTuner v0.8.9 is now available</title>
		<link>http://rackerhacker.com/2008/04/05/mysqltuner-v089-is-now-available/</link>
		<comments>http://rackerhacker.com/2008/04/05/mysqltuner-v089-is-now-available/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 16:03:14 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=287</guid>
		<description><![CDATA[MySQLTuner v0.8.9 is now available.  There are a few bug fixes, performance improvements, and readability adjustments. Table enumeration and sizing can now be skipped I've received reports that MySQLTuner will stall while enumerating tables on servers that contain a lot of tables or a lot of large tables.  You can now use the --skipsize option [...]<p><a href="http://rackerhacker.com/2008/04/05/mysqltuner-v089-is-now-available/">MySQLTuner v0.8.9 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>MySQLTuner v0.8.9 is <a title="MySQLTuner v0.8.9" href="http://rackerhacker.com/mysqltuner/">now available</a>.  There are a few bug fixes, performance improvements, and readability adjustments.</p>
<p><strong>Table enumeration and sizing can now be skipped</strong><br />
I've received reports that MySQLTuner will stall while enumerating tables on servers that contain a lot of tables or a lot of large tables.  You can now use the <code>--skipsize</code> option to skip over the table enumeration process and let the script finish.  However, you will not be able to receive some recommendations since the script was unable to determine which storage engines are enabled.</p>
<p><strong>New table enumeration and sizing method for MySQL 5</strong><br />
The script now uses information_schema to enumerate tables and their sizes for MySQL 5 servers.  This has provided a drastic improvement in performance.</p>
<p><strong>Readability improvements</strong><br />
The recommendations for query_cache_limit and max_heap_table_size/tmp_table_size have been improved.</p>
<p>As always, I welcome your suggestions, bug reports, and questions!  Please feel free to drop a comment on this blog posting or send me an e-mail (it's in the script).  Also, don't forget to <a title="MySQLTuner Mailing List" href="http://rackerhacker.com/mysqltuner/">sign up for the MySQLTuner version announcement list</a>.</p>
<p><a href="http://rackerhacker.com/2008/04/05/mysqltuner-v089-is-now-available/">MySQLTuner v0.8.9 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/04/05/mysqltuner-v089-is-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing MySQL dumps made on 64-bit servers</title>
		<link>http://rackerhacker.com/2008/03/21/importing-mysql-dumps-made-on-64-bit-servers/</link>
		<comments>http://rackerhacker.com/2008/03/21/importing-mysql-dumps-made-on-64-bit-servers/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 17:51:56 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/03/21/importing-mysql-dumps-made-on-64-bit-servers/</guid>
		<description><![CDATA[It's tough to find examples of dumps that can't be properly reimported on other servers. However, if you have a 64-bit server, and you make a MySQL dump file from it, you may see this issue when importing the dump on a 32-bit MySQL server: ERROR 1118 (42000) at line 1686: Row size too large. [...]<p><a href="http://rackerhacker.com/2008/03/21/importing-mysql-dumps-made-on-64-bit-servers/">Importing MySQL dumps made on 64-bit servers</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It's tough to find examples of dumps that can't be properly reimported on other servers.  However, if you have a 64-bit server, and you make a MySQL dump file from it, you may see this issue when importing the dump on a 32-bit MySQL server:</p>
<p><code>ERROR 1118 (42000) at line 1686: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs</code></p>
<p>You really don't have any options in this situation.  You'll need to adjust your table on the 64-bit server for good and then make a new dump file, or you will just have to live with the fact that it can't be imported into a 32-bit instance of MySQL.</p>
<p><a href="http://rackerhacker.com/2008/03/21/importing-mysql-dumps-made-on-64-bit-servers/">Importing MySQL dumps made on 64-bit servers</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/03/21/importing-mysql-dumps-made-on-64-bit-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLTuner v0.8.6 is now available</title>
		<link>http://rackerhacker.com/2008/02/26/mysqltuner-v086-is-now-available/</link>
		<comments>http://rackerhacker.com/2008/02/26/mysqltuner-v086-is-now-available/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 03:24:52 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqltuner]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/02/26/mysqltuner-v086-is-now-available/</guid>
		<description><![CDATA[Version 0.8.6 of MySQLTuner is now available. It contains a few bug fixes and readability improvements: Newlines are placed between the sections for increased readability Each section now contains extra lines to set the sections apart. It makes the output a little longer, but easier to read as well. Storage engine status color bug Even [...]<p><a href="http://rackerhacker.com/2008/02/26/mysqltuner-v086-is-now-available/">MySQLTuner v0.8.6 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Version 0.8.6 of MySQLTuner is <a href="http://mysqltuner.com/">now available</a>.  It contains a few bug fixes and readability improvements:</p>
<p><strong>Newlines are placed between the sections for increased readability</strong><br />
Each section now contains extra lines to set the sections apart.  It makes the output a little longer, but easier to read as well.</p>
<p><strong>Storage engine status color bug</strong><br />
Even if the --nocolor option was passed, the storage engine statuses were being shown in color.</p>
<p><strong>Excluded information_schema from storage engine calculations</strong><br />
The information_schema database was causing extra MEMORY tables to show up in the calculations. They're now excluded when the calculations are being made.</p>
<p>Shawn Ashlee has also been added as a contributor as he's been a constant help for the project.  He's recommended implementation ideas and he has worked to create internal MySQLTuner RPM's for use at Rackspace.  Thanks, Shawn!</p>
<p><a href="http://rackerhacker.com/2008/02/26/mysqltuner-v086-is-now-available/">MySQLTuner v0.8.6 is now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/02/26/mysqltuner-v086-is-now-available/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

