<?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: How to add a new MySQL slave</title>
	<atom:link href="http://www.redips.net/mysql/add-new-slave/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redips.net/mysql/add-new-slave/</link>
	<description>Techniques and Web Technologies</description>
	<lastBuildDate>Thu, 11 Mar 2010 16:39:25 +0100</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gavin Towey</title>
		<link>http://www.redips.net/mysql/add-new-slave/comment-page-1/#comment-1488</link>
		<dc:creator>Gavin Towey</dc:creator>
		<pubDate>Fri, 06 Nov 2009 02:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=51#comment-1488</guid>
		<description>I agree with Stijin.  I do this kind of thing all the time, and find it much better to read the position from the stopped slave, and use CHANGE MASTER TO, to initialize the new slave.

In step one, just do SHOW SLAVE STATUS \G
and record  Relay_Master_Log_File and Exec_Master_Log_Pos

It&#039;s very very important that it&#039;s those two, and not some of the other fields that look like they might be the master position.  Because those define the position on the master it&#039;s actually exectued on the slave.

Then just use CHANGE MASTER TO.  That lets mysql manage it&#039;s master.info and such w/out the chance for messing up those files.  The other advantages are that it can be done through the mysql client, instead of mucking around in files on the new slave, and you don&#039;t have to restart mysql on the new slave -- assuming you have slave-id set before you start.</description>
		<content:encoded><![CDATA[<p>I agree with Stijin.  I do this kind of thing all the time, and find it much better to read the position from the stopped slave, and use CHANGE MASTER TO, to initialize the new slave.</p>
<p>In step one, just do SHOW SLAVE STATUS \G<br />
and record  Relay_Master_Log_File and Exec_Master_Log_Pos</p>
<p>It's very very important that it's those two, and not some of the other fields that look like they might be the master position.  Because those define the position on the master it's actually exectued on the slave.</p>
<p>Then just use CHANGE MASTER TO.  That lets mysql manage it's master.info and such w/out the chance for messing up those files.  The other advantages are that it can be done through the mysql client, instead of mucking around in files on the new slave, and you don't have to restart mysql on the new slave -- assuming you have slave-id set before you start.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How To Set Up Database Replication In MySQL &#171; Narendra Dhami</title>
		<link>http://www.redips.net/mysql/add-new-slave/comment-page-1/#comment-696</link>
		<dc:creator>How To Set Up Database Replication In MySQL &#171; Narendra Dhami</dc:creator>
		<pubDate>Mon, 07 Sep 2009 10:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=51#comment-696</guid>
		<description>[...] Adding More Slaves &#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] Adding More Slaves &#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stijn van der Ree</title>
		<link>http://www.redips.net/mysql/add-new-slave/comment-page-1/#comment-143</link>
		<dc:creator>Stijn van der Ree</dc:creator>
		<pubDate>Tue, 10 Mar 2009 09:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=51#comment-143</guid>
		<description>At first I also only changed the filename, and then discovered the slave was missing some data. In my case it did start reading later on, maybe because the position in the relay-log already existed (because enough data was already downloaded from the master). It&#039;s likely that if the position does not exist, it starts at zero.</description>
		<content:encoded><![CDATA[<p>At first I also only changed the filename, and then discovered the slave was missing some data. In my case it did start reading later on, maybe because the position in the relay-log already existed (because enough data was already downloaded from the master). It's likely that if the position does not exist, it starts at zero.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbunic</title>
		<link>http://www.redips.net/mysql/add-new-slave/comment-page-1/#comment-142</link>
		<dc:creator>dbunic</dc:creator>
		<pubDate>Mon, 09 Mar 2009 22:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=51#comment-142</guid>
		<description>Stijn van der Ree,
I read once again MySQL manual pages &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/slave-logs.html&quot; rel=&quot;nofollow&quot;&gt;Replication Relay and Status Files&lt;/a&gt; and you have right. Not only name should be changed but position too. On the other hand, I&#039;m sure that I didn&#039;t touch &lt;em&gt;Relay_Log_Pos&lt;/em&gt; (second line) in &lt;em&gt;relay-log.info&lt;/em&gt; file, only name was changed as I described in &lt;a href=&quot;#section6&quot; rel=&quot;nofollow&quot;&gt;Edit &lt;em&gt;relay-log.info file&lt;/em&gt;&lt;/a&gt;. Hmm, the question is how did I successfully create a new MySQL slave if position was not set to zero? I can only suppose that MySQL slave ignored non existing position in newly created &lt;em&gt;new_slave_name-relay-bin.000001&lt;/em&gt; file.

Hope that someone can confirm my assumption.
Cheers!</description>
		<content:encoded><![CDATA[<p>Stijn van der Ree,<br />
I read once again MySQL manual pages <a href="http://dev.mysql.com/doc/refman/5.0/en/slave-logs.html" rel="nofollow">Replication Relay and Status Files</a> and you have right. Not only name should be changed but position too. On the other hand, I'm sure that I didn't touch <em>Relay_Log_Pos</em> (second line) in <em>relay-log.info</em> file, only name was changed as I described in <a href="#section6" rel="nofollow">Edit <em>relay-log.info file</em></a>. Hmm, the question is how did I successfully create a new MySQL slave if position was not set to zero? I can only suppose that MySQL slave ignored non existing position in newly created <em>new_slave_name-relay-bin.000001</em> file.</p>
<p>Hope that someone can confirm my assumption.<br />
Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stijn van der Ree</title>
		<link>http://www.redips.net/mysql/add-new-slave/comment-page-1/#comment-139</link>
		<dc:creator>Stijn van der Ree</dc:creator>
		<pubDate>Mon, 09 Mar 2009 09:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=51#comment-139</guid>
		<description>When editing the relay-log.info file, it&#039;s not enough to only edit the name of the relay log, but the position should be changed as well (to 0). If you don&#039;t, the slave will start reading at a later point in it&#039;s relay log.

But better then to edit the file it is to delete them both, and to initialize the slave with &quot;CHANGE MASTER TO&quot;, which values can be read from the master.info file.</description>
		<content:encoded><![CDATA[<p>When editing the relay-log.info file, it's not enough to only edit the name of the relay log, but the position should be changed as well (to 0). If you don't, the slave will start reading at a later point in it's relay log.</p>
<p>But better then to edit the file it is to delete them both, and to initialize the slave with "CHANGE MASTER TO", which values can be read from the master.info file.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
