<?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>am3n portfolio &#187; replication</title>
	<atom:link href="http://am3n.net/tag/replication/feed/" rel="self" type="application/rss+xml" />
	<link>http://am3n.net</link>
	<description>career, freelance and some stupid thing I do</description>
	<lastBuildDate>Wed, 26 May 2010 16:40:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Script to Monitor Replication</title>
		<link>http://am3n.net/2009/02/09/script-to-monitor-replication/</link>
		<comments>http://am3n.net/2009/02/09/script-to-monitor-replication/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 09:42:26 +0000</pubDate>
		<dc:creator>am3n</dc:creator>
				<category><![CDATA[Web and System Administrator]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[slave]]></category>
		<category><![CDATA[stop]]></category>

		<guid isPermaLink="false">http://am3n.net/?p=54</guid>
		<description><![CDATA[Since I sometimes get replication problem, so I make several script to check replication automatically and report to me:
To check replication status when I in the console and playing with replication configuration or when I have nothing to do yet I want to see a black screen  
monitorreplication.sh
#!/bin/bash
while [ 1 ]
do
    [...]


Related posts:<ol><li><a href='http://am3n.net/2010/01/05/free-uptime-status-monitoring/' rel='bookmark' title='Permanent Link: Free Uptime Status Monitoring'>Free Uptime Status Monitoring</a> <small>For SMB Company with few servers and network devices that...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Since I sometimes get <a href="http://am3n.net/2009/02/09/replication-stop-relay-log-file-corrupt/" target="_blank">replication problem</a>, so I make several script to check replication automatically and report to me:</p>
<p>To check replication status when I in the console and playing with replication configuration or when I have nothing to do yet I want to see a black screen <img src='http://am3n.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong><em>monitorreplication.sh</em></strong></p>
<pre>#!/bin/bash
while [ 1 ]
do
        # Your code goes here
        echo ""
        date
        echo "=============================="
        mysql -u backup -pmysqlback -e "show slave status\G;"

        # Modify sleep time (in seconds) as needed below
        sleep 10
done</pre>
<p>Another scripts to send replication status via email<br />
<span id="more-54"></span>This script is for sending email to my dept. just incase replication stop. And I have manually delete file /root/backup/slave_problem.txt if problem solved.</p>
<p><strong><em>checkreplication.sh</em></strong></p>
<pre>#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

###check if already notified###
###you have to manually delete the file after resolve the problem
if [ -f /root/backup/slave_problem.txt ]; then
exit 1;
fi

###Check if slave running###
(
echo "show slave status \G;"
) | mysql -u backup -pmysqlback 2&gt;&amp;1 | grep "Slave_IO_Running: No"
if [ "$?" -ne "1" ]; then
SUBJECT="DB23 - Replication IO failed"
mysql -u backup -pmysqlback -e "show slave status \G;" &gt; /root/backup/slave_problem.txt

else

(
echo "show slave status \G;"
) | mysql -u backup -pmysqlback 2&gt;&amp;1 | grep "Slave_SQL_Running: No"
if [ "$?" -ne "1" ]; then
SUBJECT="DB23 - Replication SQL failed"
mysql -u backup -pmysqlback -e "show slave status \G;" &gt; /root/backup/slave_problem.txt
fi

fi

###Send notification if replication down###
if [ -f /root/backup/slave_problem.txt ]; then
mail -s "$SUBJECT" it@myholding.com &lt; /root/backup/slave_problem.txt
fi</pre>
<p>This script is just to send replication status to my email only so I can monitor it if it stops, or has an error, etc.</p>
<p><strong><em>slave_report.sh</em></strong></p>
<pre>/root/backup/slave_report.sh
#!/bin/sh
mysql -u backup -pmysqlbackup -e "show slave status \G;" &gt; /root/backup/slave_report.txt
mail -s "Replication report on DB23" amin@rpxholding.com &lt; /root/backup/slave_report.txt</pre>
<p>Added the last 2 scripts into crontab:</p>
<pre>#check replication
1,11,21,31,41,51 1-23 * * * /root/backup/checkreplication.sh &gt; /dev/null 2&gt;&amp;1
5 2,6,10,14,18,22 * * * /root/backup/slave_report.sh &gt; /dev/null 2&gt;&amp;1</pre>
<p>Ref:<br />
<a href="http://blog.taragana.com/index.php/archive/how-to-write-infinite-loop-in-bash/" target="_blank">http://blog.taragana.com/index.php/archive/how-to-write-infinite-loop-in-bash/</a><br />
<a href="http://howtoforge.com/script-to-check-if-mysql-master-master-replication-is-working-correctly" target="_blank">http://howtoforge.com/script-to-check-if-mysql-master-master-replication-is-working-correctly</a></p>
<script type="text/javascript" src="http://cdn.socialtwist.com/2009042316105/script.js"></script><a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;"><img alt="SocialTwist Tell-a-Friend" style="border:0;padding:0;margin:0;" src="http://images.socialtwist.com/2009042316105/button.png"onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2009042316105', 'http%3A%2F%2Fam3n.net%2F2009%2F02%2F09%2Fscript-to-monitor-replication%2F', 'Script+to+Monitor+Replication')" onclick="STTAFFUNC.cw(this, {id:'2009042316105', link: 'http%3A%2F%2Fam3n.net%2F2009%2F02%2F09%2Fscript-to-monitor-replication%2F', title: 'Script+to+Monitor+Replication' });"/></a>

<p>Related posts:<ol><li><a href='http://am3n.net/2010/01/05/free-uptime-status-monitoring/' rel='bookmark' title='Permanent Link: Free Uptime Status Monitoring'>Free Uptime Status Monitoring</a> <small>For SMB Company with few servers and network devices that...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://am3n.net/2009/02/09/script-to-monitor-replication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replication stop &#8211; Relay log file corrupt</title>
		<link>http://am3n.net/2009/02/09/replication-stop-relay-log-file-corrupt/</link>
		<comments>http://am3n.net/2009/02/09/replication-stop-relay-log-file-corrupt/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 09:10:11 +0000</pubDate>
		<dc:creator>am3n</dc:creator>
				<category><![CDATA[Web and System Administrator]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[slave]]></category>
		<category><![CDATA[stop]]></category>

		<guid isPermaLink="false">http://am3n.net/?p=51</guid>
		<description><![CDATA[Okay it&#8217;s the second time this problem arise, so I&#8217;ll put a blog here just incase it happen again in near future. The replication on slave server just stop working with error
Could not parse relay log event entry. The possible reasons are: the master&#8217;s binary log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Okay it&#8217;s the second time this problem arise, so I&#8217;ll put a blog here just incase it happen again in near future. The replication on slave server just stop working with error</p>
<blockquote><p>Could not parse relay log event entry. The possible reasons are: the master&#8217;s binary log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; on the binary log), the slave&#8217;s relay log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; on the relay log), a network problem, or a bug in the master&#8217;s or slave&#8217;s MySQL code. If you want to check the master&#8217;s binary log or slave&#8217;s relay log, you will be able to know their names by issuing &#8216;SHOW SLAVE STATUS&#8217; on this slave.</p></blockquote>
<p>Googling up and check several paramters:</p>
<p><strong><em>on master server:</em></strong></p>
<pre>mysql&gt; show master status\G;
*************************** 1. row ***************************
File: replication.011
Position: 130848689
Binlog_do_db:
Binlog_ignore_db:
1 row in set (0.00 sec)</pre>
<p><em><strong>on slave server:</strong></em></p>
<pre>mysql&gt; show slave status\G;
*************************** 1. row ***************************
Master_Host: 10.10.105.11
Master_User: repl
Master_Port: 3306
Connect_retry: 60
Master_Log_File: replication.011
Read_Master_Log_Pos: 91831752
Relay_Log_File: dragon-relay-bin.183
Relay_Log_Pos: 3551175
Relay_Master_Log_File: replication.011
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_do_db:
Replicate_ignore_db:
Last_errno: 0
Last_error: Could not parse relay log event entry. The possible
reasons are: the master's binary log is corrupted (you can check
this by running 'mysqlbinlog' on the binary log), the slave's
relay log is corrupted (you can check this by running 'mysqlbinlog'
 on the relay log), a network problem, or a bug in the master's or
slave's MySQL code. If you want to check the master's binary log or
slave's relay log, you will be able to know their names by issuing
'SHOW SLAVE STATUS' on this slave.
Skip_counter: 0
Exec_master_log_pos: 74359528
Relay_log_space: 21023399

[root@dragon mysql]# tail -f dragon.rpxholding.com.err
081129  0:54:24 Error in Log_event::read_log_event(): 'read error',
 data_len: 148, event_type: 2 081129  0:54:24 Error reading relay
log event: slave SQL thread aborted because of I/O error 081129 0:54:24
Slave: Could not parse relay log event entry. The possible reasons are:
the master's binary log is corrupted (you can check this by running
'mysqlbinlog' on the binary log),  the slave's relay log is corrupted
(you can check this by running 'mysqlbinlog' on the relay log), a network
problem, or a bug in the master's or slave's MySQL code. If you want to
check the master's binary log or slave's relay log, you will be able to
know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 0</pre>
<p>Slave IO and SQL are not running. What caused the problem  ? binlog file at master is not corrupted. That&#8217;s great and very good news. But relay log file at slave is corrupted. That&#8217;s what make replication can&#8217;t read it. Fixing the problem:</p>
<p><span id="more-51"></span><em><strong>on slave server:</strong></em></p>
<pre>mysql&gt; change master to master_log_file='replication.011',master_log_pos=74359676;
mysql&gt; slave start;
mysql&gt; show slave status\G;
*************************** 1. row ***************************
Master_Host: 10.10.105.11
Master_User: repl
Master_Port: 3306
Connect_retry: 60
Master_Log_File: replication.011
Read_Master_Log_Pos: 135111081
Relay_Log_File: dragon-relay-bin.001
Relay_Log_Pos: 3204826
Relay_Master_Log_File: replication.011
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_do_db:
Replicate_ignore_db:
Last_errno: 0
Last_error:
Skip_counter: 0
Exec_master_log_pos: 77564456
Relay_log_space: 60751451
1 row in set (0.00 sec)

ERROR:
No query specified</pre>
<p>Where do I get parameter master_log_file=&#8217;replication.011&#8242; and master_log_pos=74359676 ? it&#8217;s from &#8220;show slave status&#8221; command</p>
<ul>
<li>master_log_file=&#8217;replication.011&#8242; is the last time slave read master log file and fortunately master still logging to that file too <img src='http://am3n.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (it&#8217;s from s)</li>
<li>master_log_pos=74359676 is the next log pos slave should execute a query from master. it&#8217;s from Exec_master_log_pos=74359528. So how do I know the next pos of 74359528 is 74359676? Simple! I do this:
<pre># cd /var/lib/mysql
# mysqlbinlog replication.011 &gt; replication.011.txt
# vi replication.011.txt -- search for 74359528 and the next pos is 74359676</pre>
</li>
</ul>
<p>Next question: What caused relay log file corrupted? (only my assumption) at the time replication stop slave server also doing a full backup and transferring a 3.5GB backup file to another server. this may cause NIC at full throttle and make relay log corrupt.</p>
<p>PS: I still don&#8217;t what to do if my master binlog files is corrupt. Perhaps I&#8217;ll be doing a full database mirroring (copying all databases files from master to slave when mysql down just to make both servers have the same database) to make sure data integrity</p>
<p>References:</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html" target="_blank">http://sql.dzone.com/news/troubleshooting-relay-log-corr</a></li>
<li><a href="http://www.pythian.com/blogs/876/when-show-slave-status-and-the-error-log-disagree" target="_blank">http://www.pythian.com/blogs/876/when-show-slave-status-and-the-error-log-disagree</a></li>
<li><a href="http://www.mysqlperformanceblog.com/2008/07/07/how-show-slave-status-relates-to-change-master-to/" target="_blank">http://www.mysqlperformanceblog.com/2008/07/07/how-show-slave-status-relates-to-change-master-to/</a></li>
<li> <a href="http://www.brandonchecketts.com/archives/fixing-a-corrupt-mysql-relay-log" target="_blank">http://www.brandonchecketts.com/archives/fixing-a-corrupt-mysql-relay-log</a></li>
</ul>
<p>Edit: Feb 14, 2009</p>
<p>The replication stop again slave server. this time after <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val=" " /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --> <!--[endif]-->thorough investigation, found out the server is nearly at full capation (especially the /var partition). Clean some stuffs, and I get 16GB of free space. Free space indeed an important thing I should check first <img src='http://am3n.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<script type="text/javascript" src="http://cdn.socialtwist.com/2009042316105/script.js"></script><a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;"><img alt="SocialTwist Tell-a-Friend" style="border:0;padding:0;margin:0;" src="http://images.socialtwist.com/2009042316105/button.png"onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2009042316105', 'http%3A%2F%2Fam3n.net%2F2009%2F02%2F09%2Freplication-stop-relay-log-file-corrupt%2F', 'Replication+stop+%26%238211%3B+Relay+log+file+corrupt')" onclick="STTAFFUNC.cw(this, {id:'2009042316105', link: 'http%3A%2F%2Fam3n.net%2F2009%2F02%2F09%2Freplication-stop-relay-log-file-corrupt%2F', title: 'Replication+stop+%26%238211%3B+Relay+log+file+corrupt' });"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://am3n.net/2009/02/09/replication-stop-relay-log-file-corrupt/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Skip Replication Error</title>
		<link>http://am3n.net/2009/02/09/skip-replication-error/</link>
		<comments>http://am3n.net/2009/02/09/skip-replication-error/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 08:23:07 +0000</pubDate>
		<dc:creator>am3n</dc:creator>
				<category><![CDATA[Web and System Administrator]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://am3n.net/?p=56</guid>
		<description><![CDATA[This is happen long time ago when Mysql Replication stop due to duplicate error, Kumay has the log. But I don&#8217;t want to do a manual labor. So to skip a duplicate error on A MySQL Replication Server (SLAVE) automatically. Added this line on /etc/my.cnf
Note: Make sure you know what cause a duplicate error and [...]


Related posts:<ol><li><a href='http://am3n.net/2009/12/27/magento-error-with-pdo_mysql/' rel='bookmark' title='Permanent Link: Magento error with pdo_mysql'>Magento error with pdo_mysql</a> <small>Magento is a great Free / Open source eCommerce script,...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is happen long time ago when Mysql Replication stop due to duplicate error, <a href="http://www.kumay.web.id/2008/06/16/kalau-mysql-server-replicate-ga-jalan/" target="_blank">Kumay has the log.</a> But I don&#8217;t want to do a manual labor. So to skip a duplicate error on A MySQL Replication Server (SLAVE) automatically. Added this line on /etc/my.cnf</p>
<p><span style="color: #ff0000;"><strong>Note</strong></span>: Make sure you know what cause a duplicate error and does it really not important so that you can skip inserting that query.<br />
<span id="more-56"></span></p>
<pre>[mysqld]
...
slave-skip-errors=1062</pre>
<p>You can use other error code, if that error happen. Again: Make sure you know what cause the error, and why you want to skip it.<br />
References:</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html</a></li>
</ul>
<script type="text/javascript" src="http://cdn.socialtwist.com/2009042316105/script.js"></script><a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;"><img alt="SocialTwist Tell-a-Friend" style="border:0;padding:0;margin:0;" src="http://images.socialtwist.com/2009042316105/button.png"onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2009042316105', 'http%3A%2F%2Fam3n.net%2F2009%2F02%2F09%2Fskip-replication-error%2F', 'Skip+Replication+Error')" onclick="STTAFFUNC.cw(this, {id:'2009042316105', link: 'http%3A%2F%2Fam3n.net%2F2009%2F02%2F09%2Fskip-replication-error%2F', title: 'Skip+Replication+Error' });"/></a>

<p>Related posts:<ol><li><a href='http://am3n.net/2009/12/27/magento-error-with-pdo_mysql/' rel='bookmark' title='Permanent Link: Magento error with pdo_mysql'>Magento error with pdo_mysql</a> <small>Magento is a great Free / Open source eCommerce script,...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://am3n.net/2009/02/09/skip-replication-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
