<?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: Mysql master slave server database load balancing</title>
	<atom:link href="http://sysadminupdates.com/blog/2010/02/26/mysql-master-slave-server-database-load-balancing/feed/" rel="self" type="application/rss+xml" />
	<link>http://sysadminupdates.com/blog/2010/02/26/mysql-master-slave-server-database-load-balancing/</link>
	<description>Linux infrastructure support and bash scripting, Unix/Linux System administration</description>
	<lastBuildDate>Fri, 26 Feb 2010 14:45:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://sysadminupdates.com/blog/2010/02/26/mysql-master-slave-server-database-load-balancing/comment-page-1/#comment-2</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 26 Feb 2010 14:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://sysadminupdates.com/blog/?p=3#comment-2</guid>
		<description>Cleaning MySQL Bin logs

Please DO NOT delete or compress mysql-bin logs. They are used by MySQL slaves. Anything done to them without a careful purge will break replication.

Here is what needs to be done:

On cihcisdweb201, for example:

#&gt; mysql -uroot -S /tmp/mysql.sock

mysql&gt; show master status;
+------------------+-----------+--------------+------------------+
&#124; File             &#124; Position  &#124; Binlog_Do_DB &#124; Binlog_Ignore_DB &#124;
+------------------+-----------+--------------+------------------+
&#124; mysql-bin.000017 &#124; 968373696 &#124;              &#124;                  &#124; 
+------------------+-----------+--------------+------------------+
1 row in set (0.00 sec)

mysql&gt; PURGE MASTER LOGS BEFORE &#039;2009-12-04 12:02:00&#039; ;
Query OK, 0 rows affected (1.04 sec)

In this case, use a proper date (you could choose the date-time 2 Hrs before the time you are executing the query). This will cleanup the logs for you and update the bin log index... And will not break replication.</description>
		<content:encoded><![CDATA[<p>Cleaning MySQL Bin logs</p>
<p>Please DO NOT delete or compress mysql-bin logs. They are used by MySQL slaves. Anything done to them without a careful purge will break replication.</p>
<p>Here is what needs to be done:</p>
<p>On cihcisdweb201, for example:</p>
<p>#> mysql -uroot -S /tmp/mysql.sock</p>
<p>mysql> show master status;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| File             | Position  | Binlog_Do_DB | Binlog_Ignore_DB |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| mysql-bin.000017 | 968373696 |              |                  |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
1 row in set (0.00 sec)</p>
<p>mysql> PURGE MASTER LOGS BEFORE &#8216;2009-12-04 12:02:00&#8242; ;<br />
Query OK, 0 rows affected (1.04 sec)</p>
<p>In this case, use a proper date (you could choose the date-time 2 Hrs before the time you are executing the query). This will cleanup the logs for you and update the bin log index&#8230; And will not break replication.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
