<?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>A Touch of Summer &#187; mysql</title>
	<atom:link href="http://www.atouchofsummer.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.atouchofsummer.com</link>
	<description>Tips, Tricks and Thoughts of a WordPress Tinkerer</description>
	<lastBuildDate>Mon, 07 Sep 2009 19:30:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Manually Restoring a Crunchy Database</title>
		<link>http://www.atouchofsummer.com/manually-restoring-a-crunchy-database/</link>
		<comments>http://www.atouchofsummer.com/manually-restoring-a-crunchy-database/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 05:43:14 +0000</pubDate>
		<dc:creator>Summer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.atouchofsummer.com/?p=17</guid>
		<description><![CDATA[It&#8217;s usually prudent to back up one&#8217;s databases fully before transferring a domain from one hosting provider to another.  So what do you do when not even that goes according to plan?
I made the mistake of trusting that a full transfer worked, just because the sites and the data on the new location seemed [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s usually prudent to back up one&#8217;s databases fully before transferring a domain from one hosting provider to another.  So what do you do when not even that goes according to plan?</p>
<p>I made the mistake of trusting that a full transfer worked, just because the sites and the data on the new location seemed fine.  It wasn&#8217;t until a few days later, when trying to create new posts, that I uncovered a MySQL glitch.</p>
<p>I&#8217;m still not sure what exactly caused the glitch, but on three (possibly four) of the transferred sites, the auto-increment keys were munged, at the very least.  At least, that&#8217;s the one thing that makes sense from the behavior.</p>
<p>What&#8217;s even more interesting is that I ended up taking a different approach to restoring each of the sites.</p>
<p>First site: empty all tables, and restore data from the seemingly incompatible backup. This cleared up the problem, but all of the options from the previous setup were gone, along with a bunch of stats. Not an optimal end solution.</p>
<p>Second site: in order to avoid loss of options and stats, I did a WordPress export of the current site to extract the data needed, then deleted the tables for terms, taxonomy and posts.  I recreated those tables using the SQL statements from the Wordpress code from the same version as what was currently running.  Once those tables were recreated, I ran the import of the WordPress XML file, and all seemed fine.  Turns out the comments were still crunchy.</p>
<p>Third and fourth site: repeate of process for site two, including the comments table from the start.</p>
<p>There are times when all those years spent troubleshooting as a sysadmin pay off.</p>
<p>Lesson learned: never trust what Plesk tells you about your database backup.  Go commando if you can (command line interface and mysldump are your safe bets).</p>
<p>Next, to play with DirectAdmin and see if it can give me the same control panel flexibility as Plesk without the same headaches.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.atouchofsummer.com%2Fmanually-restoring-a-crunchy-database%2F&amp;linkname=Manually%20Restoring%20a%20Crunchy%20Database"><img src="http://www.atouchofsummer.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.atouchofsummer.com/manually-restoring-a-crunchy-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
