<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Resyncing table on MySQL Slave</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 14:06:19 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-320982</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 01 Jul 2008 21:14:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-320982</guid>
		<description>Sheeri,

You can use MySQLHotCopy however this makes the process much more elaborate if you have traffic flowing as you need to ensure the table is &quot;synced&quot; at same point in time in master and slave which can be hard to guaranty for complex replication topologies.    

The mk-table-sync is nice tool as I mentioned though it is not always installed.  If you just want to do things once using Stock MySQL tools that is what I mainly wrote about.

Thanks for feedback :)</description>
		<content:encoded><![CDATA[<p>Sheeri,</p>
<p>You can use MySQLHotCopy however this makes the process much more elaborate if you have traffic flowing as you need to ensure the table is &#8220;synced&#8221; at same point in time in master and slave which can be hard to guaranty for complex replication topologies.    </p>
<p>The mk-table-sync is nice tool as I mentioned though it is not always installed.  If you just want to do things once using Stock MySQL tools that is what I mainly wrote about.</p>
<p>Thanks for feedback <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sheeri</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-320730</link>
		<dc:creator>Sheeri</dc:creator>
		<pubDate>Tue, 01 Jul 2008 09:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-320730</guid>
		<description>Don&#039;t forget that you can also use mysqlhotcopy if the table is MyISAM.  This option is not given, but many folks still use MyISAM tables.

Also, you have not mentioned how one might determine that the slave is out of sync.  There may be some data sync issues you discover through replication errors; or perhaps you use mk-table-sync or mk-table-checksum, or MySQL&#039;s built-in CHECKSUM() function.

At any rate, if it&#039;s a small table, mk-table-sync is actually the best tool anyway, as with one command it will checksum the table, determine differences, and can either write statements to a file to fix the slave, or actually enact the differences.  This takes a longer time and will (read) lock the master for a longer time if the table is bigger.

Still, this is a good reference for folks who cannot have ma&#039;atkit on their system for whatever reason.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget that you can also use mysqlhotcopy if the table is MyISAM.  This option is not given, but many folks still use MyISAM tables.</p>
<p>Also, you have not mentioned how one might determine that the slave is out of sync.  There may be some data sync issues you discover through replication errors; or perhaps you use mk-table-sync or mk-table-checksum, or MySQL&#8217;s built-in CHECKSUM() function.</p>
<p>At any rate, if it&#8217;s a small table, mk-table-sync is actually the best tool anyway, as with one command it will checksum the table, determine differences, and can either write statements to a file to fix the slave, or actually enact the differences.  This takes a longer time and will (read) lock the master for a longer time if the table is bigger.</p>
<p>Still, this is a good reference for folks who cannot have ma&#8217;atkit on their system for whatever reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-320085</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 30 Jun 2008 17:03:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-320085</guid>
		<description>James,

Indeed  TRUNCATE does not work with LOCKED table.

Suhaib,

Reloading the table is pretty much only way with logical level replication.

You can also use mysqldump to reload the table. What I described here just gives you a bit more control about data visibility.</description>
		<content:encoded><![CDATA[<p>James,</p>
<p>Indeed  TRUNCATE does not work with LOCKED table.</p>
<p>Suhaib,</p>
<p>Reloading the table is pretty much only way with logical level replication.</p>
<p>You can also use mysqldump to reload the table. What I described here just gives you a bit more control about data visibility.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suhaib</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-319949</link>
		<dc:creator>Suhaib</dc:creator>
		<pubDate>Mon, 30 Jun 2008 10:05:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-319949</guid>
		<description>James, so is the dumping &amp; reloading from file the only way to make out-of-sync slave synchronized.</description>
		<content:encoded><![CDATA[<p>James, so is the dumping &amp; reloading from file the only way to make out-of-sync slave synchronized.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ak47</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-319943</link>
		<dc:creator>ak47</dc:creator>
		<pubDate>Mon, 30 Jun 2008 09:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-319943</guid>
		<description>James:
w/ truncate you would probably run into http://bugs.mysql.com/bug.php?id=20667 which is easily demonstrable.</description>
		<content:encoded><![CDATA[<p>James:<br />
w/ truncate you would probably run into <a href="http://bugs.mysql.com/bug.php?id=20667" rel="nofollow">http://bugs.mysql.com/bug.php?id=20667</a> which is easily demonstrable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Cohen</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-319940</link>
		<dc:creator>James Cohen</dc:creator>
		<pubDate>Mon, 30 Jun 2008 09:43:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-319940</guid>
		<description>@Suhaib - The INSERT/SELECT would work on the master but (assuming you&#039;re using statement based replication) would just reload the original (out of sync) data on the slave.

@Peter - any reason why you use DELETE in place of TRUNCATE in the original example?</description>
		<content:encoded><![CDATA[<p>@Suhaib &#8211; The INSERT/SELECT would work on the master but (assuming you&#8217;re using statement based replication) would just reload the original (out of sync) data on the slave.</p>
<p>@Peter &#8211; any reason why you use DELETE in place of TRUNCATE in the original example?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suhaib</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-319912</link>
		<dc:creator>Suhaib</dc:creator>
		<pubDate>Mon, 30 Jun 2008 08:42:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-319912</guid>
		<description>Why not use INSERT-SELECT query instead of dumping table &amp; then reloading it again. I think INSERT-SELECT query works quite fast compare to this.</description>
		<content:encoded><![CDATA[<p>Why not use INSERT-SELECT query instead of dumping table &amp; then reloading it again. I think INSERT-SELECT query works quite fast compare to this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/29/resyncing-table-on-mysql-slave/comment-page-1/#comment-319854</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Mon, 30 Jun 2008 06:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=422#comment-319854</guid>
		<description>Depending on the storage engine, you may need to be careful with the auto-increment variable with the first method. Better to manually save &amp; restore that value as well.</description>
		<content:encoded><![CDATA[<p>Depending on the storage engine, you may need to be careful with the auto-increment variable with the first method. Better to manually save &amp; restore that value as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
