<?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>MySQL Fanboy</title>
	<atom:link href="http://www.mysqlfanboy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlfanboy.com</link>
	<description>Almost crazy about Opensource / Free  information.</description>
	<lastBuildDate>Sat, 28 Jan 2012 05:12:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>To NULL or NOT to NULL that is the question.</title>
		<link>http://www.mysqlfanboy.com/2012/01/to-null-or-not-to-null-that-is-the-question/</link>
		<comments>http://www.mysqlfanboy.com/2012/01/to-null-or-not-to-null-that-is-the-question/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 17:07:19 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=762</guid>
		<description><![CDATA[I liked Shlomi Noach post on &#8220;IS TRUE and IS FALSE&#8220;.  This kind of logic create bugs. What will this return? select if((1 = true) and ( 1 is TRUE) and (NULL is not TRUE), TRUE, FALSE) as answer; You should know, NULL is never TRUE or FALSE but NULL is always NOT TRUE or [...]]]></description>
			<content:encoded><![CDATA[<p>I liked Shlomi Noach post on &#8220;<a title="Permanent Link to Syntax of the day: IS TRUE and IS FALSE" href="http://code.openark.org/blog/mysql/syntax-of-the-day-is-true-and-is-false" rel="bookmark">IS TRUE and IS FALSE</a>&#8220;.  This kind of logic create bugs.</p>
<p>What will this return?</p>
<p>select if((1 = true) and ( 1 is TRUE) and (NULL is not TRUE), TRUE, FALSE) as answer;</p>
<p>You should know,</p>
<p>NULL is never TRUE or FALSE but</p>
<p>NULL is always NOT TRUE or NOT FALSE.</p>
<p>NULL is a little like a vacuum.  Ancient <a title="Greek philosophy" href="http://en.wikipedia.org/wiki/Greek_philosophy">Greek philosophers</a> did not like to admit the existence of a vacuum, asking themselves &#8220;how can &#8216;nothing&#8217; be something?&#8221;.    Does GOD exist in NULL?</p>
<p>If  select &#8220;&#8221; is NOT NULL; is TRUE what is &#8220;&#8221;?</p>
<pre>select "" is NOT NULL;
+----------------+
| "" is NOT NULL |
+----------------+
|              1 |
+----------------+</pre>
<p>Is the lack of an answer, an answer? Is the lack of datum, DATA?  Or should it be &#8220;&#8221;.  Should we record the blank spaces?</p>
<p>Given:</p>
<div>
<table>
<tbody>
<tr>
<td>Create Table</td>
</tr>
<tr>
<td>CREATE TABLE `test` (<br />
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,<br />
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,<br />
`data` varchar(16) DEFAULT NULL,<br />
KEY `id` (`id`)<br />
) ENGINE=MyISAM</td>
</tr>
</tbody>
</table>
</div>
<p>When should this happen?</p>
<p>for x = 1 to X;<br />
INSERT INTO `test`(`data`) VALUES ( NULL);<br />
next x;</p>
<p>Null happens.</p>
<p><img class="left" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2012%2F01%2Fto-null-or-not-to-null-that-is-the-question%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=To NULL or NOT to NULL that is the question. - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2012/01/to-null-or-not-to-null-that-is-the-question/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The State of High Availability</title>
		<link>http://www.mysqlfanboy.com/2012/01/the-state-of-high-availability/</link>
		<comments>http://www.mysqlfanboy.com/2012/01/the-state-of-high-availability/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 16:55:06 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[DRDB]]></category>
		<category><![CDATA[HA]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=742</guid>
		<description><![CDATA[Searching for the Holly GrailFor months I have been writing and rewriting an blog post called “The Full Monty”. It’s a kind of how to build complete production system from scratch. I’m still not done. Maybe I’m fullish thinking I can build a one type fits all database server. But that’s not the problem. I’ve [...]]]></description>
			<content:encoded><![CDATA[<div><strong id="internal-source-marker_0.19038121355697513"><a href="http://www.mysqlfanboy.com/wp-content/uploads/2012/01/HolyGrail.jpg"><img class="alignright size-medium wp-image-743" title="HolyGrail" src="http://www.mysqlfanboy.com/wp-content/uploads/2012/01/HolyGrail-300x165.jpg" alt="" width="300" height="165" /></a></strong>Searching for the Holly GrailFor months I have been writing and rewriting an blog post called “The Full Monty”. It’s a kind of how to build complete production system from scratch. I’m still not done. Maybe I’m fullish thinking I can build a one type fits all database server. But that’s not the problem. I’ve found myself chasing the Holly Grail of HA and replication.I’ve build many virtual clusters with all the HA / replication package I could find.</div>
<div></div>
<div></div>
<div>I’ve tried <a href="http://www.drbd.org/">DRBD</a>, <a href="http://linux-ha.org/wiki/Heartbeat">Heartbeat</a>,  <a href="http://mysql-mmm.org/">Multi Master Management</a> (MMM), <a href="http://code.google.com/p/tungsten-replicator/">Tungsten</a>, <a href="http://provenscaling.com/software/flipper/">Flipper</a>, <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Cluster_Suite_Overview/s1-rhcs-intro-CSO.html">Redhat Cluster Suite</a> (RCS), <a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster.html">MySQL Cluster</a>, <a href="http://code.google.com/p/mysql-master-ha/">MySQL Master HA</a> (MHA) and the <a href="http://www.percona.com/doc/percona-xtradb-cluster/index.html">Percona XtraDB Cluster</a> (PXC).  Some of these are just very simple (Flipper) some are heavy (RCS) and some are promising but in Alpha (PXC) or still a little rough (MHA).  Yoshinori Matsunobu (author of MHA) describes some of the <a href="http://code.google.com/p/mysql-master-ha/wiki/Other_HA_Solutions">solutions</a>to the issues.</div>
<div></div>
<div>White papers and discussions abound. Shlomi Noach and Baron Schwartz have public discussed problems with MMM show just how hard this problem is. ( <a href="http://code.openark.org/blog/mysql/problems-with-mmm-for-mysql">SH </a>/ <a href="http://www.xaprb.com/blog/2011/05/04/whats-wrong-with-mmm/">BS</a> ) Even <a href="http://kovyrin.net/">Alexey Kovyrin</a> said in a reply to Brian “<em>&#8230;Every time I try to add HA to my clusters I remember MMM and want to stab myself because I simply could not trust my data to the tool&#8230;</em>”.</div>
<div>
<p>Tungsten works. But size does matter. It is one of the heaver solutions requiring Java and many moving parts with version requirements and dependencies. As a result you can build a working system but its rock and hard to move forward to newer releases its parts.</p>
<p>Percona’s XtraDB Cluster gives me hope. It’s Alpha and only works on InnoDB tables (now) but it’s light, eazy to install and maintain.  (I think I can see the Holly Grail.)</p>
<p>I’m currently taking a second look at MySQL Master HA. My first run through was rough. MHA suffered from some dependency trouble and documentation holes. It seems to be currently under rapid development. That’s both good and bad. MHA may be your best choose if you’re looking from something free, simple to install and easy to maintain that keep your DBS alive. Unlike MMM, MHA does not move IP address.  You&#8217;ll still need something more like heartbeat.</p>
<p>How can you choose wisely?  Lets talk.</p>
</div>
<div><img class="left" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></div>
<div></div>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2012%2F01%2Fthe-state-of-high-availability%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=The State of High Availability  - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2012/01/the-state-of-high-availability/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Install mysql-master-ha (MHA) on CentOS</title>
		<link>http://www.mysqlfanboy.com/2011/12/install-mysql-master-ha-mha-on-centos/</link>
		<comments>http://www.mysqlfanboy.com/2011/12/install-mysql-master-ha-mha-on-centos/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 22:32:15 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=721</guid>
		<description><![CDATA[MySQL doesn’t often crash, but, if you use MySQL on a production system you should have High Availability. Maybe you’ve not heard of MHA.  Yoshinori Matsunobu only released it in July of this year (2011).  I’ve been reviewing it and I think you should too. There are a lot of people chasing after this “holy [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>MySQL doesn’t often crash, but, if you use MySQL on a production system you should have High Availability.</p>
<p>Maybe you’ve not heard of <a href="http://code.google.com/p/mysql-master-ha/">MHA</a>.  <a href="http://yoshinorimatsunobu.blogspot.com/2011/07/announcing-mysql-mha-mysql-master-high.html">Yoshinori Matsunobu</a> only released it in July of this year (2011).  I’ve been reviewing it and I think you should too. There are a lot of people chasing after this “holy grail” and most systems are complex and / or <a href="http://www.xaprb.com/blog/2011/05/04/whats-wrong-with-mmm/">hard to recover</a> when they fail. MHA simple and easy to use.</p>
<p>MHA is a fail over tool. It’s designed to fail a master and promote a slave to a new master. (This is simply to say but you should read how it’s done.) It can monitor your master or you can manually fail over.  Failing back doesn’t happen. Your expected to fix the failed master and turn it into a slave.  The monitoring program (masterha_manager) will stop running after a fail over.</p>
<p>I’m not going to give details on <a href="http://code.google.com/p/mysql-master-ha/wiki/Overview">how MHA works</a>. I’ll assume you have a master and some number of slaves already working.</p>
<p><strong>Your slave/s server should be ready to become masters.</strong> This means they have sever_id and bin-log set.  You should be able to run &#8216;show master status&#8217; on your slave/s and get an answer. Slaves should also be set with read_only=1 and realy_log_purge=0;</p>
<h3><strong>Preparing the way </strong></h3>
<p>Download the latest version of MHA from the Google Code server. <a href="http://code.google.com/p/mysql-master-ha/downloads/list">http://code.google.com/p/mysql-master-ha/downloads/list</a></p>
<p>Every MySQL server needs to have a copy of the MHA node installed.</p>
<pre><strong><span style="color: #339966;"> yum install perl-DBD-MySQL.x86_64 </span></strong></pre>
<pre><strong> <span style="color: #339966;">rpm -i mha4mysql-node-0.52-0.noarch.rpm</span></strong></pre>
<h3>The Manager</h3>
<p>The Manageris a little more difficult.  It should be run on a system outside your cluster.  Should the Manager process fail your HA process fails with it.  (<a href="http://en.wikipedia.org/wiki/Quis_custodiet_ipsos_custodes%3F">Quis custodiet ipsos custodes?</a>)</p>
<p>There are a number of required Perl modules.  You may find you have to use CPAN to install these. CPAN will require you install perl-YAML, make and gcc.  (I found this the easiest for CentOS 6.2)  If you use CPAN you will need to tell RPM to skip dependencies.</p>
<ul>
<li>DBD::mysql</li>
<li>Config::Tiny</li>
<li>Log::Dispatch</li>
<li>Parallel::ForkManager</li>
<li>Time::HiRes</li>
</ul>
<pre><strong><span style="color: #339966;"> rpm -i mha4mysql-manager-0.52-0.noarch.rpm --nodeps</span></strong></pre>
<p><strong>This may not be needed.</strong> On some systems, because I installed on a x64 version (as you should be too) I found I had to copy the MHA libraries to the perl lib64 space.  You might want to make simlinks instead.</p>
<pre><strong> <span style="color: #339966;"> cp -crp  /usr/lib/perl5/vendor_perl/MHA  /usr/lib64/perl5/vendor_perl</span></strong></pre>
<p>You only need one configuration file if you are not going to monitor multiple Master/Slave clusters.  You can name this configuration file anything you want.  Change these setting and make sure the directories exist and are writable.</p>
<p>On the server where the Manager will be running:</p>
<pre><strong> <span style="color: #339966;"> vi /etc/MHA.cnf</span></strong>

[server default]
user=<span style="color: #ff0000;">hauser</span>
password=<span style="color: #ff0000;">P@ssw0rd</span>
manager_workdir=<span style="color: #ff0000;">/var/log/masterha</span>
manager_log=<span style="color: #ff0000;">/var/log/masterha/MHA.log</span>
remote_workdir=<span style="color: #ff0000;">/var/log/masterha</span>

[server1]
hostname=<span style="color: #ff0000;">db1</span>

[server2]
hostname=<span style="color: #ff0000;">db2</span></pre>
<p>The MHA will need access to each server so you need to add the user to each.  On all MySQL server add the hauser.</p>
<pre> <strong><span style="color: #339966;"><span style="color: #000000;">mysql&gt;</span> grant all on *.* to 'hauser'@'192.168.%.%'  identified by 'P@ssw0rd'; </span></strong> <strong>mysql&gt;<span style="color: #339966;"> flush privileges;</span></strong><strong><span style="color: #339966;"> </span></strong></pre>
<p>Now is a good time to make sure all the server names resolve on each system and they know their own names.</p>
<p>MHA also need ssh access to each server. You need to create ssh keys and copy to the mysql servers.</p>
<p><strong>Don’t do these steps </strong>if you already have ssh keys installed.</p>
<pre><strong> <span style="color: #339966;">ssh-keygen -t dsa -f ~/.ssh/id_dsa -N ""  </span></strong></pre>
<pre><strong><span style="color: #339966;"> cp ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys</span></strong></pre>
<pre><strong><span style="color: #339966;"> scp -r ~/.ssh <span style="color: #ff0000;">db2:</span></span></strong></pre>
<p>Check if you have ssl working with the masterha_check_ssh tool.  Look for the <strong>OK</strong> after the connect test.</p>
<p>From the Manager server:</p>
<pre><strong> <span style="color: #339966;">masterha_check_ssh  --conf=/etc/MHA.cnf</span></strong>

Thu Dec  1 10:10:52 2011 - [info] Starting SSH connection tests..
Thu Dec  1 10:10:53 2011 - [debug]
Thu Dec  1 10:10:52 2011 - [debug]  Connecting via SSH from root@db1(192.168.0.11) to root@db2(192.168.2.12)..
Thu Dec  1 10:10:53 2011 - [debug]   <span style="color: #339966;"><strong>ok</strong></span>.</pre>
<p>MHA need to control replication so you should test it with masterha_check_repl. This will outout a lot of chat.  Your looking for the ‘MySQL Replication Health is<strong> OK</strong>’ at the end.   You might also pay attention to any warnings.</p>
<pre><strong> <span style="color: #339966;">masterha_check_repl  --conf=/etc/MHA.cnf</span></strong>

---
Thu Dec  1 10:07:22 2011 - [info] Checking slave configurations..
Thu Dec  1 10:07:22 2011 - [warning]  <span style="color: #800000;"><strong>read_only=1</strong></span> is not set on slave db2(192.168.0.11:3306).
Thu Dec  1 10:07:22 2011 - [warning]  <span style="color: #800000;"><strong>relay_log_purge=0</strong></span> is not set on slave db2(192.168.0.12:3306).
---
MySQL Replication Health is <strong>OK</strong>.</pre>
<p><strong>You now have MHA installed</strong>.  If you configure it wrong MHA will give some errors that are not helpful and die. Check your settings again.</p>
<p>If you want MHA to monitor the status of your master server you need to run masterha_manager.  It does not normally run as a daemon.  If masterha_manage is not running your server will not automatically fail over.  This is a weakness in MHA.  You might want to use something like <a href="http://www.linux-ha.org/wiki/Pacemaker">Pacemaker(Heartbeat)</a> to monitor your systems and MHA to do the fail over.  Here is how I make MHA run in the background.</p>
<pre><strong> <span style="color: #339966;">nohup  masterha_manager  --conf=/etc/MHA.cnf &amp;</span></strong></pre>
<p>You can check masterha_manager with masterha_check_status.</p>
<pre><strong> <span style="color: #339966;">masterha_check_status  --conf=/etc/MHA.cnf</span></strong></pre>
<p>Now the magic. If you want to manual fail over you can use masterha_master_switch and tell it the master is alive.</p>
<pre><strong> <span style="color: #339966;">masterha_master_switch  --master_state=alive --conf=/etc/MHA.cnf</span></strong></pre>
<p>If your using another monitoring system like Pacemaker you can have it run this command to automatically fail your master.</p>
<pre><strong> <span style="color: #339966;">masterha_master_switch --master_state=dead --dead_master_host=db1 --conf=/etc/MHA.cnf</span></strong></pre>
<p>If you find I’ve missed something or it works different on your OS please drop me a comment.</p>
<p><img class="Left" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p>&nbsp;</p>
</div>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F12%2Finstall-mysql-master-ha-mha-on-centos%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Install mysql-master-ha (MHA) on CentOS - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/12/install-mysql-master-ha-mha-on-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simplified MySQL SSL connections</title>
		<link>http://www.mysqlfanboy.com/2011/11/simplified-mysql-ssl-connections/</link>
		<comments>http://www.mysqlfanboy.com/2011/11/simplified-mysql-ssl-connections/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 23:09:42 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=712</guid>
		<description><![CDATA[In last weeks OurSQL postcast (episode 65)  Sheeri,  Sarah and Jerry talked about making MySQL safe with SSL.  Encryption always seems to be such a confusing subject. I think every database should be using SSL by default.  So, I was wondering just how easily SSL could be setup. Most existing examples I found  setup SSL authentication and encryption.  If you are handling  PCI [...]]]></description>
			<content:encoded><![CDATA[<p>In last weeks OurSQL postcast (<a href="http://technocation.org/content/oursql-episode-66%3A-breaking-news-reels">episode 6</a>5)  <a href="http://en.wikipedia.org/wiki/Sheeri_Cabral" target="_blank">Sheeri</a>,  <a href="http://sarahnovotny.com/" target="_blank">Sarah</a> and Jerry talked about making MySQL safe with SSL.  Encryption always seems to be such a confusing subject. I think every database should be using SSL by default.  So, I was wondering just how easily SSL could be setup.</p>
<p>Most existing examples I found  setup SSL authentication and encryption.  If you are handling  <a href="http://www.elementps.com/merchants/pci-dss-requirements/">PCI DSS</a> or <a href="http://www.hhs.gov/ocr/privacy/hipaa/understanding/srsummary.html">HIPAA</a> data you must encrypt the data on the wire, but passwords are all you need to authenticate the application to the data source.</p>
<pre> # mkdir /etc/mysql/certs
 # cd /etc/mysql/certs</pre>
<p>This looks complicated, it&#8217;s not.  JUST PRESS ENTER when openssl ask you a question.  This will not make you any less secure.  Your data will be encrypted.   Note these keys will expire in three years (1095 days).</p>
<pre> # openssl genrsa 2048 &gt; ca-key.pem
 # openssl req -new -x509 -nodes -days 1095 -key ca-key.pem -out ca-cert.pem
 # openssl req -newkey rsa:2048 -days 1095 -nodes -keyout server-key.pem -out server-req.pem
 # openssl rsa -in server-key.pem -out server-key.pem
 # openssl x509 -req -in server-req.pem -days 1095 -CA ca-cert.pem -CAkey ca-key.pem \
 -set_serial 01 -out server-cert.pem</pre>
<p>With the keys generated you need to tell MySQL to use them. Add these lines to your my.cnf.</p>
<pre> # vi /etc/my.cnf</pre>
<pre> ssl
 ssl-cipher=DHE-RSA-AES256-SHA
 ssl-ca=/etc/mysql/certs/ca-cert.pem
 ssl-cert=/etc/mysql/certs/server-cert.pem
 ssl-key=/etc/mysql/certs/server-key.pem</pre>
<p>Now restart mysql.</p>
<pre> # service mysql restart</pre>
<p>You should see SSL is enabled and mysql sees the keys.</p>
<pre> mysql&gt; show variables like '%ssl%';
 +---------------+----------------------------------+
 | Variable_name | Value                            |
 +---------------+----------------------------------+
 | have_openssl  | <span style="color: #ff0000;"><strong>YES </strong></span> |
 | have_ssl      | <span style="color: #ff0000;"><strong>YES </strong></span> |
 | ssl_ca        | /etc/mysql/certs/ca-cert.pem     |
 | ssl_capath    |                                  |
 | ssl_cert      | /etc/mysql/certs/server-cert.pem |
 | ssl_cipher    | DHE-RSA-AES256-SHA               |
 | ssl_key       | /etc/mysql/certs/server-key.pem  |
 +---------------+----------------------------------+
 7 rows in set (0.00 sec)</pre>
<p>Duplicate these keys and the configuration segment to all your servers.</p>
<p>&nbsp;</p>
<p><strong>Client</strong></p>
<p>If the client system is not a server, copy of the MySQL SSL keys to it was well.  Then, you need to tell the client to use SSL.  Edit your user&#8217;s .my.cnf file and give it the keys too.</p>
<pre> # vi ~/.my.cnf</pre>
<pre>[client]
 ssl
 ssl-cipher=DHE-RSA-AES256-SHA
 ssl-ca=/etc/mysql/certs/ca-cert.pem</pre>
<p>Thats it.  It should be working.  Look for &#8216;Cipher in use&#8217;.</p>
<pre> # mysql -e "\s"</pre>
<pre>mysql Ver 14.14 Distrib 5.1.59, for unknown-linux-gnu (x86_64) using readline 5.1</pre>
<pre> Connection id: 7
 Current database:
 Current user: root@localhost
 SSL: <span style="color: #ff0000;"><strong>Cipher in use</strong></span> is DHE-RSA-AES256-SHA
 ......
 Threads: 1 Questions: 22 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 2.0</pre>
<p>&nbsp;</p>
<p><strong>Replication</strong></p>
<p>On the master, you need to tell the replication user to require SSL connections. Replace the <em>rep_user</em> with your replication user&#8217;s ID.</p>
<pre> mysql&gt; GRANT USAGE ON *.* TO '<em>rep_user</em>'@'%'  <span style="color: #ff0000;"><strong>REQUIRE SSL</strong></span>;
 mysql&gt; flush privileges;</pre>
<p>and on the slave tell it to connect to the master with SSL.  Then make sure you are still connecting. Change the IP and user name, show here,  to your settings.</p>
<pre> mysql&gt; stop slave;
 mysql&gt; CHANGE MASTER TO master_host='<em>192.168.1.12</em>', master_user='<em>rep_user</em>', \
MASTER_SSL=1, MASTER_SSL_CA = '/etc/mysql/certs/ca-cert.pem' ;
 mysql&gt; start slave;
 mysql&gt; show slave status;</pre>
<p>&nbsp;</p>
<p><strong>Applications</strong></p>
<p>Your application could be written in lots of different languages and I can&#8217;t go over each of them but here are some links to setup up SSL connection to MySQL in several of the most popular.  If you know where there are some better examples, please leave me a comment.</p>
<p><a href="http://mysql-python.sourceforge.net/MySQLdb.html">Python</a></p>
<p><a href="http://code.activestate.com/lists/perl-dbi-users/34958/">Perl</a></p>
<p><a href="http://www.razorsql.com/articles/mysql_ssl_jdbc.html">JDBC</a></p>
<p><img class="alignleft" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F11%2Fsimplified-mysql-ssl-connections%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Simplified MySQL SSL connections - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/11/simplified-mysql-ssl-connections/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Full Monty- Part 3</title>
		<link>http://www.mysqlfanboy.com/2011/10/the-full-monty-part-3/</link>
		<comments>http://www.mysqlfanboy.com/2011/10/the-full-monty-part-3/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 16:19:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=680</guid>
		<description><![CDATA[This is more boring parts but you must lay a good foundation. MySQL Setup: All the resources must be in place before you configure Pacemaker. The default location for MySQL data is /var/lib/mysql.  You will be moving this to the DRBD file system in /data/mysql.   The default MySQL configuration is in /etc/my.cnf.  I move it [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>This is more boring parts but you must lay a good foundation.</p>
<h3>MySQL Setup:</h3>
<p>All the resources must be in place before you configure Pacemaker. The default location for MySQL data is /var/lib/mysql.  You will be moving this to the DRBD file system in /data/mysql.   The default MySQL configuration is in /etc/my.cnf.  I move it to /data/mysql so updates will move with system fail overs.   To keep life simple I use sym-links to point from /var/lib/mysql and /etc/my.cnf to their new locations.<br />
Install MySQL of your choise on DB1, DB2 and DB3.</p>
<pre># <strong><span style="color: #008000;">rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm</span></strong>
# <strong><span style="color: #008000;">yum -y install Percona-Server-server-51.x86_64 Percona-Server-client-51.x86_64 \
 Percona-Server-shared-51.x86_64 xtrabackup.x86_64</span></strong>
# <strong><span style="color: #008000;">service mysql start</span></strong>
# <strong><span style="color: #008000;">mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"</span></strong>
# <strong><span style="color: #008000;">mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"</span></strong>
# <strong><span style="color: #008000;">mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"</span></strong>
# <strong><span style="color: #008000;">service mysql stop</span></strong>
# <strong><span style="color: #008000;">chkconfig mysql off</span></strong></pre>
<p>ON DB1, move MySQL data to the DRBD file system.</p>
<pre># <strong><span style="color: #008000;">df</span></strong></pre>
<pre>Filesystem        1K-blocks   Used Available Use% Mounted on
 /dev/md2           11903664      1633608   9655620   15% /
 /dev/md1             505508        218159    261250    46% /tmp
 /dev/md0             256586         25967    217371    11% /boot
 tmpfs               2037412  16348   2021064    1% /dev/shm
 /dev/drbd1         30477552 176200  28753152    1% /data</pre>
<p>On DB1 and DB3</p>
<pre># <strong><span style="color: #008000;">mkdir /data/mysql</span></strong>
# <strong><span style="color: #008000;">cp -prv /var/lib/mysql/* /data/mysql</span></strong>
# <strong><span style="color: #008000;">mv /var/lib/mysql /var/lib/mysql-empty</span></strong>
# <strong><span style="color: #008000;">ln -s /data/mysql /var/lib/mysql</span></strong>
# <strong><span style="color: #008000;">touch /data/mysql/my.cnf</span></strong>
# <strong><span style="color: #008000;">ln -sf /data/mysql/my.cnf /etc/my.cnf</span></strong>
# <strong><span style="color: #008000;">chown -R mysql.mysql /data/mysql</span></strong>
# <strong><span style="color: #008000;">chmod 644 /data/mysql/my.cnf</span></strong></pre>
<p>On DB2, make it ready for a fail over.</p>
<pre># <strong><span style="color: #008000;">mv /var/lib/mysql /var/lib/mysql-empty</span></strong>
# <strong><span style="color: #008000;">ln -sf /data/mysql /var/lib/mysql</span></strong>
# <strong><span style="color: #008000;">ln -sf /data/mysql/my.cnf /etc/my.cnf</span></strong></pre>
<h4 dir="ltr">Configure MySQL (/data/mysql/my.cnf)</h4>
<p>I have a documented <a href="http://www.mysqlfanboy.com/Files/my.cnf">my.cnf</a> file I start with. You need to change the server-id number on each server.  The minimum setting you will need are:</p>
<pre>[mysqld]
 log-bin=mysql-bin
 server-id=1
 innodb_flush_log_at_trx_commit=2
 sync_binlog=1</pre>
<p>on DB1</p>
<pre># <strong><span style="color: #008000;">service mysql start</span></strong></pre>
<p>Now we need to add a couple of user before we install the replicator.  We also need to set a password for the root user.  The root password is blank so just it return.</p>
<p>If you have skip-name-resolve set you will need to substitute the host names for IP addresses.</p>
<pre># <span style="color: #008000;"><span style="color: #000000;">mysql</span><strong> -h localhost -u root -p
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> DROP USER ''@'db.grennan.com';
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> DROP USER ''@'localhost';
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> GRANT ALL on *.* TO 'root'@'%' IDENTIFIED by 'P@ssw0rd' with GRANT option;
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> GRANT ALL on *.* TO 'root'@'localhost' IDENTIFIED by 'P@ssw0rd' with GRANT option;
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> GRANT ALL ON *.* TO 'tungsten'@'127.0.0.1' IDENTIFIED BY 'P@ssw0rd' WITH GRANT OPTION;
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> GRANT ALL ON *.* TO 'tungsten'@'localhost' IDENTIFIED BY 'P@ssw0rd' WITH GRANT OPTION;
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> GRANT ALL ON *.* TO 'tungsten'@'db.grennan.com' IDENTIFIED BY 'P@ssw0rd' WITH GRANT OPTION;
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> GRANT ALL ON *.* TO 'tungsten'@'db2.grennan.com' IDENTIFIED BY 'P@ssw0rd' WITH GRANT OPTION;
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> GRANT ALL ON *.* TO 'tungsten'@'db3.grennan.com' IDENTIFIED BY 'P@ssw0rd' WITH GRANT OPTION;
 </strong><span style="color: #000000;"> mysql&gt;</span><strong> flush privileges;</strong></span></pre>
<p>Now that we can access MySQL from any of the servers we need to prepare each as a master and replication.  We can fix DB1 and then copy all of the data tables to the other servers.</p>
<pre><span style="color: #000000;"> mysql&gt;</span><strong><span style="color: #008000;"> reset master; reset slave;
 </span></strong><span style="color: #008000;"><span style="color: #000000;"> mysql&gt;</span></span><strong><span style="color: #008000;"> exit</span></strong>
# <strong><span style="color: #008000;">service mysql stop</span></strong>
# <strong><span style="color: #008000;">rsync -rog --delete /data/mysql  root@db2:/data</span></strong>
# <strong><span style="color: #008000;">rsync -rog --delete /data/mysql  root@db3:/data</span></strong></pre>
<p>Remember we put the my.cnf file in the /data/mysql directory.  We need to make sure each has a unique server_id number.</p>
<pre># <strong><span style="color: #008000;">vi /etc/my.cnf</span></strong>
 server_id = 1
# <strong><span style="color: #008000;">ssh db2</span></strong>
# <strong><span style="color: #008000;">vi /etc/my.cnf</span></strong>
 server_id = 2
# <strong><span style="color: #008000;">exit</span></strong>
# <strong><span style="color: #008000;">ssh db3</span></strong>
 server_id = 3
# <strong><span style="color: #008000;">exit</span></strong></pre>
<p>Rather than type the password for MySQL each type we connect.  We can also setup a private my.cnf to prevent this. This should connect you to the master (RW) server from each host.</p>
<pre># <strong><span style="color: #008000;">vi ~/.my.cnf</span></strong></pre>
<pre>[Client]
 user=root
 password=P@ssw0rd
 host=db.grennan.com
 socket=/data/mysql/mysql.sock</pre>
<pre># <strong><span style="color: #008000;">scp .my.cnf db2:.</span></strong>
# <strong><span style="color: #008000;">scp .my.cnf db3:.</span></strong></pre>
<p>&nbsp;</p>
<p><strong>Next up,  Configuring Heartbeat and making failover work!</strong></p>
<p>&nbsp;</p>
<p><img class="alignnone" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p>&nbsp;</p>
</div>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F10%2Fthe-full-monty-part-3%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=The Full Monty- Part 3 - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/10/the-full-monty-part-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What can I DROP?</title>
		<link>http://www.mysqlfanboy.com/2011/09/what-can-i-drop/</link>
		<comments>http://www.mysqlfanboy.com/2011/09/what-can-i-drop/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 17:35:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HOW TO]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=675</guid>
		<description><![CDATA[So you have inherited a MySQL server and no one know what applications are use what databases.   Space is every tight and every night transactions logs almost fill your hard disk.  The server was once used as a replication server and it seems every database the company uses is duplicated here. You could do [...]]]></description>
			<content:encoded><![CDATA[<p>So you have inherited a MySQL server and no one know what applications are use what databases.   Space is every tight and every night transactions logs almost fill your hard disk.  The server was once used as a replication server and it seems every database the company uses is duplicated here.</p>
<p>You could do a full dump, drop everything and wait for the requests to restore. (This might be OK on a test database.)</p>
<p>We could ask MySQL for all the databases that have tables that have been updated in the last 30 days.</p>
<pre>$ mysql information_schema -e  \
"select DISTINCT TABLE_SCHEMA as NAME from TABLES
  WHERE UPDATE_TIME IS NOT NULL and UPDATE_TIME &gt; NOW() - INTERVAL 30 DAY"  \
&gt; Databases</pre>
<p>But this only gives a list of databases that have changed.  What about tables that are only read from?</p>
<p>Bin-Logs don&#8217;t help because they too only have updates.  What we really need is a long snapshot of the general log. But, starting the general log will just fill your disk space even more.</p>
<p>As long as all queries are remote we can use tcpdump.</p>
<p>Filter all the MySQL connections for  &#8216;FROM tablenames&#8217;.</p>
<pre>$ tcpdump -i eth1 -s 0 -l -w - dst port 3306 | strings | \
 sed -n 's/\(.*\)\(from.*\)/\2/p' | awk '{print $2}' &gt; TableList
 $ cat TableList | sort | uniq &gt; ShortList</pre>
<p>Some of the queries may reference databases.tablename so we can filter out the database names and add them to your Database list.</p>
<pre>$ cat TableList | sed -n 's/\./ /p' | awk '{print $1}' | sort | uniq &gt;&gt; Databases</pre>
<p>Now for the queries that only use table names. We need to find the database each belongs to.  This isn&#8217;t completely accurate because the table name may be in more then one databases.</p>
<pre>$  for x in `cat TableList | sort | uniq` ;
 do
 mysql information_schema -e "select TABLE_SCHEMA from TABLES where TABLE_NAME='$x'\G"  \
 | grep TABLE | awk '{print $2}' ;
 done | sort | uniq &gt;&gt; Databases</pre>
<p>To create the final list of database that should not be dropped.</p>
<pre>$ sort Databases | uniq &gt; KEEPTHESE ; cat KEEPTHESE</pre>
<p>Now you can do the deed with some confidence your not removing anything being used.</p>
<p>&nbsp;</p>
<p><img class="alignleft" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>P.S.  Did I tell you, Never do anything you can&#8217;t reverse.   Make a BACKUP FIRST!</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F09%2Fwhat-can-i-drop%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=What can I DROP? - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/09/what-can-i-drop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Full Monty- Part 2</title>
		<link>http://www.mysqlfanboy.com/2011/08/the-full-month-part-2/</link>
		<comments>http://www.mysqlfanboy.com/2011/08/the-full-month-part-2/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 19:39:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=651</guid>
		<description><![CDATA[Installing DRDB in CentOS 5.6. In Part 1 I when through the process of preparing a number of CentOS 5.6 servers. Now make the services they’ll preform more stable. High Availability (HA) I’ll be presenting two ways to provide redundant data and high available services. First, Pacemaker &#8211; with DRDB will duplicate your data at [...]]]></description>
			<content:encoded><![CDATA[<p>Installing DRDB in CentOS 5.6.
</p>
<p>In <a href="http://www.mysqlfanboy.com/2011/08/the-full-monty-centos-5-5-drbd-pacemaker-mysql-tunsten-replication-and-more/">Part 1</a> I when through the process of preparing a number of <a href="https://www.centos.org/">CentOS </a>5.6 servers. Now make the services they’ll preform more stable.</p>
<h3>High Availability (HA)</h3>
<p>I’ll be presenting two ways to provide redundant data and high available services. First, Pacemaker &#8211; with <a href="www.drbd.org">DRDB </a>will duplicate your data at the disk partition level and watch for failures. Should the hardware failure, Pacemaker will take all the needed steps to start MySQL on the Hot Stand By (HSB). This is not perfect. Should someone run ‘rm *’ or drop a database DRDB will duplicate the loss on the HSB.</p>
<p>In another part, I’ll use <a href="http://code.google.com/p/tungsten-replicator/">Tungsten replicator</a>. It offers a set of features that surpass the built-in MySQL replicator. The community version of Tungsten has global transaction IDs so even with many slaves, global transactions IDs make turning a slave into the master easy. Tungsten replicator is not a HA service. You have to manually fail to a new master. Tungsten Enterprise (if you have money) solves all the issues. With the tools the enterprise version supplies you can easily migrate the “master” server to any slave.</p>
<h3>HA with Pacemaker:</h3>
<p>Neither RedHat or CentOS supply PaceMaker packages. Redhat support their own propitiatory clustering suite. CentOS is suck trying to maintain compatibility with Redhat while still giving you a high availability system. CentOS does supply heartbeat and openais but not pacemaker. Thankful Redhat helps out by supporting the <a href="http://fedoraproject.org/">Fedora project</a> and in turn Fedora provide an <a href="http://www.google.com/url?q=http%3A%2F%2Fwww.clusterlabs.org%2Frpm%2F&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNF0XcJrX5pKiMfKi3GCKycEfrMosA">EPEL repository for Redhat 5</a>.</p>
<p>The Pacemaker packages in Fedora&#8217;s EPEL directories are built against some additional packages that don&#8217;t exist on vanilla RHEL/CentOS installs. For more information on EPEL, see <a href="http://fedoraproject.org/wiki/EPEL/FAQ">http://fedoraproject.org/wiki/EPEL/FAQ</a> So before installing Pacemaker, you will first need to tell the machine how to find the EPEL packages Pacemaker depends on. To do this, download and install the EPEL package that matches your RHEL/CentOS version.</p>
<p>LINBIT is the primary maintainer of DRBD and offers a product and service portfolio for exactly what we are building here. They have produced a <a href="http://www.google.com/url?q=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dd0jXgrtkVJ4">video </a>that takes you through this same process using the the DRDB Console Manager. I&#8217;m going to take you through the same process by hand. I hope this way you will better understand the management touch points.</p>
<h3>DRBD Installation:</h3>
<p>I build two computer alike in every way (clones) and use DRBD to sync the data partitions on each. CentOS provides the packages needed.</p>
<pre><strong> # <span style="color: #008000;">wget http://www.clusterlabs.org/rpm/epel-5/clusterlabs.repo</span>  
 # <span style="color: #008000;">mv clusterlabs.repo /etc/yum.repos.d</span>  
 # <span style="color: #008000;">rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm</span>  
 # <span style="color: #008000;">yum -y install pacemaker.x86_64 heartbeat.x86_64 drbd83.x86_64 kmod-drbd83.x86_64</span></strong>
<strong> # <span style="color: #008000;">/sbin/chkconfig --add heartbeat</span>  
 # <span style="color: #008000;">depmod</span>  
 # <span style="color: #008000;">modprobe drbd</span></strong></pre>
<h3>DRBD Configuration:</h3>
<p>On both machines (db1 and db2), edit the DRBD configuration file. The host names must be the save as returned by &#8216;hostname&#8217; command. You may also need to edit the host name in <strong>/etc/sysconfig/network</strong>. I have highlighted parts you will need to edit in red.</p>
<p>To replace the shared-secret, select at least half of the characters from the &#8220;63 random alpha-numeric characters&#8221; from Gibson Research <a href="http://www.grc.com/passwords.htm">Ultra High Security Passwords</a>.</p>
<pre><strong> # <span style="color: #008000;">vi /etc/drbd.conf</span></strong></pre>
<pre> include "drbd.d/global.conf";
 include "drbd.d/*.res";</pre>
<pre><strong># <span style="color: #008000;">vi /etc/drbd.d/global.conf</span></strong></pre>
<pre><span style="color: #0000ff;">global { usage-count yes; }
common { startup { degr-wfc-timeout 0; }
net { cram-hmac-alg sha1; shared-secret <span style="color: #ff0000;">R4x2alEkxtIg2kzbXqUL6l4uoTI7Ab7Qt</span>; }
disk { on-io-error detach; } }</span></pre>
<pre># <strong><span style="color: #008000;">hostname</span></strong>
 db1.grennan.com</pre>
<pre><strong># <span style="color: #008000;">vi /etc/drbd.d/db.res</span></strong></pre>
<pre><span style="color: #0000ff;">resource db { protocol C; syncer { rate 10M; }
on <span style="color: #ff0000;">db1.grennan.com</span> { device /dev/<span style="color: #ff0000;">drbd0</span>; disk /dev/<span style="color: #ff0000;">md3</span>; address <span style="color: #ff0000;">192.168.4.1</span>:7788; flexible-meta-disk internal; }
on <span style="color: #ff0000;">db2.grennan.com</span> { device /dev/<span style="color: #ff0000;">drbd0</span>; disk /dev/<span style="color: #ff0000;">md3</span>; address <span style="color: #ff0000;">192.168.4.2</span>:7788; flexible-meta-disk internal; } }</span></pre>
<pre><strong> # <span style="color: #008000;">scp -r /etc/drbd.d db2:/etc</span>  # <span style="color: #008000;">scp -r /etc/drbd.conf db2:/etc</span></strong></pre>
<h3>Manage DRDB processes:</h3>
<p>If the disk was formatted during the OS install you may need to erase the ext3 file system info on both DB1 and DB2.</p>
<pre><strong> # <span style="color: #008000;">umount /data</span>  # <span style="color: #008000;">dd if=/dev/zero of=/dev/<span style="color: #ff0000;">md3</span> count=2048</span></strong></pre>
<p>Write the DRBD meta data on both DB1 and DB2.</p>
<p># <span style="color: #008000;">drbdadm create-md db</span></p>
<p>On &gt;&gt;&gt; DB1 only &lt;&lt;&lt;</p>
<pre><strong>  # <span style="color: #008000;">drbdadm adjust db</span> </strong>
<strong>  # <span style="color: #008000;">drbdsetup /dev/<span style="color: #ff0000;">drbd0</span> primary -o</span></strong>
<strong>  # <span style="color: #008000;">service drbd start</span></strong></pre>
<p>On DB2</p>
<p><strong>  #<span style="color: #008000;"> service drbd start</span></strong></p>
<p>Did you miss the &gt;&gt;&gt; DB1 only &lt;&lt;&lt; above?   If you did you&#8217;ll need to re-run &#8216;drbdsetup /dev/drbd0 primary -o&#8217; on DB1.</p>
<p><strong><span style="color: #ff0000;">WAIT until the sync process completes.</span></strong></p>
<p>Back on DB1 create the file system and mount it.</p>
<pre><strong>  # <span style="color: #008000;">mkdir /data</span> </strong>
<strong>  # <span style="color: #008000;">mkfs -j /dev/<span style="color: #ff0000;">drbd0</span></span></strong>
<strong>  # <span style="color: #008000;">tune2fs -c -1 -i 0 /dev/<span style="color: #ff0000;">drbd0</span></span></strong>
<strong>  # <span style="color: #008000;">mkdir /data</span></strong>
<strong>  # <span style="color: #008000;">mount -o rw /dev/<span style="color: #ff0000;">drbd0</span> /data</span></strong></pre>
<p>Don&#8217;t forget to make the /data directory on DB2.</p>
<pre><strong>  # <span style="color: #008000;">mkdir /data/mysql</span></strong>
<strong>  # <span style="color: #008000;">cat /proc/drbd</span></strong></pre>
<pre>version: 8.3.8 (api:88/proto:86-94)
 GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09</pre>
<pre>1: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r----
 ns:2433920 nr:0 dw:0 dr:2433920 al:0 bm:148 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:28530088
 [==&gt;.................] sync'ed: 21.9% (27860/30236)M delay_probe: 757
 finish: 4:57:11 speed: 1,248 (6,404) K/sec</pre>
<p>In the next post I’ll go through installing MySQL in preparation for configuring Pacemaker. Then I’ll show you how to test fail over.</p>
<p>In the next part I will go over setting up MySQL.</p>
<p><img class="alignleft" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F08%2Fthe-full-month-part-2%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=The Full Monty- Part 2 - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/08/the-full-month-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Full Monty &#8211; Scientfic Linux 6.1, drbd, PaceMaker, MySQL, Tunsten Replication and more</title>
		<link>http://www.mysqlfanboy.com/2011/08/the-full-monty-centos-5-5-drbd-pacemaker-mysql-tunsten-replication-and-more/</link>
		<comments>http://www.mysqlfanboy.com/2011/08/the-full-monty-centos-5-5-drbd-pacemaker-mysql-tunsten-replication-and-more/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 05:00:36 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[DRDB]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[Heartbeat]]></category>
		<category><![CDATA[HOW TO]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=556</guid>
		<description><![CDATA[PART 1 – This will be a multi part post. THIS DOCUMENT IS BEING UPDATED &#8211; PLEASE WATCH FOR CHANGES! After years of supporting MySQL, for many different companies, I&#8217;ve seen this story played out again and again. The company: chooses a Database Management System (MySQL) installs the DBMS on a computer with other processes [...]]]></description>
			<content:encoded><![CDATA[<h3>PART 1 – This will be a multi part post.</h3>
<p><span style="color: #ff0000;"><strong>THIS DOCUMENT IS BEING UPDATED &#8211; PLEASE WATCH FOR CHANGES!</strong></span></p>
<p>After years of supporting MySQL, for many different companies, I&#8217;ve seen this story played out again and again.<br />
The company:</p>
<ul>
<li>chooses a Database Management System (MySQL)</li>
<li>installs the DBMS on a computer with other processes</li>
<li>writes many programs to access the data (Without concern on how the queries are written.)</li>
<li>moves DBMS to a computer of its own and writes more programs</li>
<li>buy bigger computer to run the DBMS and writes more programs</li>
<li>tires of DBMS response times and outages caused by developers working on production systems and hires a Database Administrator to fix the mess</li>
</ul>
<p>This is a step by step description of  how I build a highly available, production MySQL servers. Like most things it life, these problems can be avoided with a little extra work at the start.</p>
<p>My first goal is to create a MySQL DBMS that with 99.999% up time. MySQL can distribute read requests but not writes. This make write service a single point of failure. To fix this you can either turn a slave server into the master or provide a hot standby to become the master.</p>
<p>My second goal is scalability. This is done by creating more read only slave servers. More slaves complicate turning one of them into the master should the master fail. The enterprise version Continuent’s Tungsten replicator fixes this. But, my goal is to do this on the cheep for start-ups while providing flexibility for the future. With DRBD and Pacemaker I can create a hot standby for the master server.</p>
<p>I have chosen these programs and utilities because they are free. Enterprise support is available for each.</p>
<p>Here is what I’m using:</p>
<ul>
<li><a href="http://www.scientificlinux.org/">Scientific Linux 6.1</a></li>
<li><a href="http://www.drbd.org/">DRBD </a>disk replication for a hot standby</li>
<li>MySQL 5.1.xx (<a href="http://www.percona.com/">Percona</a>) or <a href="http://askmonty.org/">MeriaDB</a></li>
<li><a href="http://www.linux-ha.org/wiki/Heartbeat">Heartbeat</a></li>
<li><a href="http://www.clusterlabs.org/">Pacemaker </a>for failure recover to the hot standby</li>
<li><a href="https://code.google.com/p/tungsten-replicator/">Tunsten </a>data replication</li>
<li><a href="http://www.maatkit.org/">MaaKit </a>a toolkit for users, developers, and administrators of open-source databases</li>
<li><a href="http://code.openark.org/forge/openark-kit">OpenArk Kit</a> &#8211; a set of utilities for MySQL</li>
<li><a href="http://www.percona.com/docs/wiki/percona-xtrabackup:start">xtrabackup </a>for database backups</li>
<li><a href="https://launchpad.net/mydumper">mydumper</a> for quick dumps</li>
<li><a href="http://mysqlsandbox.net/">MySQL Sandbox</a> for testing</li>
<li><a href="http://www.mysqlfanboy.com/mytop/">mytop</a> and <a href="http://www.xaprb.com/blog/2006/07/02/innotop-mysql-innodb-monitor/">innotop</a></li>
<li><a href="http://hackmysql.com/mysqlsniffer">mysqlsniffer </a></li>
</ul>
<p>I&#8217;ve worked hard to make this just cut and past. I enjoyed the work. I hope you do to.</p>
<p><span id="more-556"></span></p>
<p><strong>NOTE: </strong> Type the <strong><span style="color: #339966;">GREEN</span></strong> stuff, cut and past the <strong><span style="color: #3366ff;">BLUE</span></strong> stuff and edit the <strong><span style="color: #ff0000;">RED</span></strong> stuff to fit you needs.</p>
<h3>Getting started:</h3>
<p>Every good system starts with good hardware. The two thinks database servers hunger for are disk space and memory. You should supply your self with as much as you can afford.  Most of my production system run on 32 gig of memory and RAID-10 systems.  Two network ports or more is recommended.  One network port will be used with a crossover cable for the heartbeat function.</p>
<p>To test this installation I&#8217;m building on a VMware server.  If you&#8217;d like to know more about this hardware read my &#8220;Building a Home VMware server&#8221; post.</p>
<h3>Building the Operating System &#8211; DB1</h3>
<p>The operating system I&#8217;m using is <del>CentOS 5.6</del> Scientfic Linux 6.1 64 bit.  <del>You might choose Redhat 6.0. I&#8217;m being conservative and I&#8217;m trying to use free (I have no budget for this project) version of commercial products with enterprise support.</del></p>
<p>To help you understand the following instructions, for this example, I&#8217;m building a virtual machines (VM) with four (4) virtual SAS hard disks. I have split the four 15G virtual disks into four partitions.  The /boot and /tmp partitions are RAID-1 and the / (root) and /data partitions are RAID-5.  The sizes of these partitions depend you your needs but your /boot needs to be about 1G and the / needs to be about 12G.  I leave /data unassigned and un-formatted.  My layout looks like this.</p>
<pre>Md0 - /boot    Md1 - /    Md2 – /tmp    Md3 - /data
Disk 0 - 15G    256M    4G    512M    11G
Disk 1 - 15G    256M    4G    512M    11G
Disk 2 - 15G    256M    4G    512M    11G
Disk 3 - 15G    256M    Checksum    512M    Checksum
Total    1G    12G    2G    33G</pre>
<h3>Install the OS:</h3>
<p>Start with a &#8220;minimum installation&#8221; with as few applications installed as possible.   No desktop or server applications are needed.<br />
The first step after the install is to update the installed packages.  With a minimum install you may find you need to fix a few things like your network connections.</p>
<pre># <span style="color: #339966;">yum -y update</span></pre>
<p>Even with a minimum install there is a little clean up.  I remove a few un-needed services like bluetooth, printing and there are a couple of packages we will need latter that where not installed.  It is better to install them now and avoid some dependency issues.  I remove supplied MySQL.</p>
<pre># <span style="color: #339966;">rpm -e bluez-utils</span>
# <span style="color: #339966;">rpm -e smartmontools</span>
# <span style="color: #339966;">yum -y install ruby</span>
# <span style="color: #339966;">yum -y install perl-DBD-MySQL.x86_64</span>
# <span style="color: #339966;">yum -y install libdbi-dbd-mysql.x86_64</span>
# <span style="color: #339966;">rpm -e mysql --nodeps</span>
# <span style="color: #339966;">chkconfig iptables off</span>
# <span style="color: #339966;">chkconfig ip6tables off</span></pre>
<p>After the OS is install and updated the disk looks like this.</p>
<pre># <span style="color: #339966;">df</span></pre>
<p>Filesystem 1K-blocks  Used Available Use% Mounted on</p>
<pre>/dev/md2  11903664    1394068 9895160  13% /
/dev/md3  29995056    176200  28270608 1%  /data
/dev/md1  505508      10547   468862   3%  /tmp
/dev/md0  256586      22969   220369   10% /boot
tmpfs     2037380     0       2037380  0%  /dev/shm</pre>
<h3>Disable Security:</h3>
<p>Because we move the MySQL data directy you will need to disable SELinux or update it.</p>
<p>To disable it, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled:</p>
<pre># <span style="color: #339966;">vi /etc/selinux/config</span>

SELINUX=disabled
# <span style="color: #339966;">echo 0 &gt;/selinux/enforce</span>
# <span style="color: #339966;">service iptables stop</span>
# <span style="color: #339966;">chkconfig iptables off</span>
# <span style="color: #339966;">service ip6tables stop</span>
# <span style="color: #339966;">chkconfig ip6tables off</span></pre>
<p>If you don’t want to disable To update SELinux for the new data directory you will need to have the the selinux tools installed.</p>
<pre># <span style="color: #339966;">yum -y install policycoreutils</span>
# <span style="color: #339966;">semanage fcontext -a -t mysqld_db_t "/data/mysql(/.*)?"</span>
# <span style="color: #339966;">restorecon -Rv /data/mysql</span></pre>
<p>Network configuration:</p>
<pre># <span style="color: #339966;">vi /etc/hosts</span>
<span style="color: #ff0000;">  192.168.2.22 db.grennan.com db </span> <span style="color: #ff0000;"> 192.168.2.23 db1.grennan.com db1 </span> <span style="color: #ff0000;">192.168.2.24 db2.grennan.com db2 </span> <span style="color: #ff0000;"> 192.168.2.25 db3.grennan.com db3</span></pre>
<h3>Syncing Time:</h3>
<p>Time Singularization is very important to maintaining data. You may want to edit the /etc/ntp.conf file to point to your primary NTP time server. CentOS and Redhat provide time servers for your use. I recommend using pool.ntp.org.</p>
<pre># <span style="color: #339966;">yum install ntp</span>
# <span style="color: #339966;">chkconfig ntpd on</span>
# <span style="color: #339966;">ntpdate 0.pool.ntp.org</span>
# <span style="color: #339966;">service ntpd start</span></pre>
<h3>Building DB2/3</h3>
<p>DB2 will become the hot standby server (drbd / heartbeat) and DB3 will  become the MySQL slave server (Tungsten).</p>
<p>If, during the OS install, you created and formatted the /data partition you will need to remove it from /etc/fstab.  On both DB1 and DB2,  edit /etc/fstab and remove the /data file system.</p>
<pre><strong># <span style="color: #339966;">vi /etc/fstab</span></strong>

/dev/md2                /                       ext3    defaults        1 1
/dev/md3                /data                   ext3    defaults        1 2
/dev/md1                /tmp                    ext3    defaults        1 2
/dev/md0                /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sdd3         swap                    swap    defaults        0 0
LABEL=SWAP-sdc3         swap                    swap    defaults        0 0
LABEL=SWAP-sdb3         swap                    swap    defaults        0 0
LABEL=SWAP-sda3         swap                    swap    defaults        0 0</pre>
<h3>Setup SSH:</h3>
<pre># ssh-keygen -t dsa -f ~/.ssh/id_dsa -N ""
# cp ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys
# scp -r ~/.ssh db2:</pre>
<pre>root@db2's password:
 id_dsa.pub         100%  610     0.6KB/s   00:00  id_dsa                   100%  668     0.7KB/s   00:00
 authorized_keys    100%  610     0.6KB/s   00:00  known_hosts              100%  398     0.4KB/s   00:00</pre>
<h3>Visualization</h3>
<p>I can&#8217;t stand the color choices made for BASH so I set my own.</p>
<pre>#<span style="color: #339966;"> vi ~/.bash_profile</span>
export LS_COLORS='no=00:fi=00:di=00;33:ln=00;36:pi=40;33:so=00;35:bd=40;33 \ 
01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00; \ 
32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00; \ 
31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00; \
31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00; \ 
35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'</pre>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F08%2Fthe-full-monty-centos-5-5-drbd-pacemaker-mysql-tunsten-replication-and-more%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=The Full Monty - Scientfic Linux 6.1, drbd, PaceMaker, MySQL, Tunsten Replication and more - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/08/the-full-monty-centos-5-5-drbd-pacemaker-mysql-tunsten-replication-and-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostGIS 1.5 in Postgresql 9.0 install on CentOS 5.6</title>
		<link>http://www.mysqlfanboy.com/2011/07/postgis-1-5-in-postgresql-9-0-install-on-centos-5-6/</link>
		<comments>http://www.mysqlfanboy.com/2011/07/postgis-1-5-in-postgresql-9-0-install-on-centos-5-6/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 19:33:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[HOW TO]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[Postgresql]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=621</guid>
		<description><![CDATA[I love short and consist install instructions. I know this is a MySQL blog but our good friend PostGreSQL has a great GIS library. This is what I learned upgrading our PostGIS system to GIS 1.5. Much thanks to Jeremy Tunnell for give this document it’s start. Start with CentOS 5.6 x86_64 basic install. Add [...]]]></description>
			<content:encoded><![CDATA[<p>I love short and consist install instructions. I know this is a MySQL blog but our good friend PostGreSQL has a great GIS library. This is what I learned upgrading our PostGIS system to GIS 1.5. Much thanks to Jeremy Tunnell for give this document it’s start.</p>
<p>Start with CentOS 5.6 x86_64 basic install.</p>
<p>Add the PostgreSQL Yum repository to your system.</p>
<pre> $ wget http://yum.pgrpms.org/reporpms/9.0/pgdg-centos-9.0-2.noarch.rpm
 $ rpm -i pgdg-centos-9.0-2.noarch.rpm</pre>
<p>Another location for these is DAG. I have to tried these so your results may very.</p>
<p>You will need to exclude the packages CentOS provide by added two lines to the BASE and UPDATE sections of /etc/yum.repos.d/CentOS-Base.repo. They are:</p>
<pre>exclude=postgresql*
exclude=geos*</pre>
<p>You you are ready to install the needed packages. This includes proj version 4 and geos version 3.</p>
<pre> $ yum install postgresql90-contrib.x86_64
 $ yum install postgis90.x86_64
 $ yum install postgresql90-server
 $ yum install proj
 $ yum install geos
 $ yum install php-pear
 $ yum install php-devel</pre>
<h3>GEOS</h3>
<p>There may be some dependencies you will have to work through. If you are using PDO and haven’t installed the pgsql PDO drivers, you can do it now:</p>
<pre> $ pecl install pdo_pgsql</pre>
<h3>PL/pgSQL</h3>
<p>You you are ready to initialize the database files and start postgresql.</p>
<pre> $ service postgresql-9.0 initdb
 $ service postgresql-9.0 start</pre>
<p>Now you can change to the postgres user and begin installing the functions for GIS. You have to start with defining the language.</p>
<pre> $ su – postgres
 $ psql
 # create language plpgsql ;
 # \q</pre>
<p>Now you can create your database and add the GIS functions calls to it.</p>
<pre> $ createdb geos
 $ psql -d geos -f /usr/pgsql-9.0/share/contrib/postgis-1.5/postgis.sql
 $ psql -d geos -f /usr/pgsql-9.0/share/contrib/postgis-1.5/spatial_ref_sys.sql</pre>
<p>You you can verify the install.</p>
<pre> $ psql geos
 # select postgis_full_version();
                                              postgis_full_version
——————————————————————————————————–
 POSTGIS=”1.5.2″ GEOS=”3.2.2-CAPI-1.6.2″ PROJ=”Rel. 4.7.1, 23 September 2009″ LIBXML=”2.6.26″ USE_STATS
(1 row)</pre>
<p>For more on using PostGIS check out Jeremy’s “PostGIS part 2”.</p>
<p><img src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" />.</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F07%2Fpostgis-1-5-in-postgresql-9-0-install-on-centos-5-6%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=PostGIS 1.5 in Postgresql 9.0 install on CentOS 5.6 - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/07/postgis-1-5-in-postgresql-9-0-install-on-centos-5-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>automysqlbackup 2.5.5</title>
		<link>http://www.mysqlfanboy.com/2011/07/automysqlbackup-2-5-5/</link>
		<comments>http://www.mysqlfanboy.com/2011/07/automysqlbackup-2-5-5/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 21:48:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[automsyqlbackup]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=618</guid>
		<description><![CDATA[I spent my day doing updates to the automysqlbackup script.  Here is some of what I&#8217;ve added over the last year. The bug number fixes are from SourceForge.  https://sourceforge.net/tracker/?atid=628964&#38;group_id=101066&#38;func=browse # 2.5.5 MTG &#8211; (2011-07-21) #    &#8211; Bug &#8211; Typo Ureadable Unreadable config file line 424 &#8211; ID: 3316825 #    &#8211; Bug &#8211; Change &#8220;#!/bin/bash&#8221; to [...]]]></description>
			<content:encoded><![CDATA[<p>I spent my day doing updates to the automysqlbackup script.  Here is some of what I&#8217;ve added over the last year.</p>
<p>The bug number fixes are from SourceForge. <a href="https://sourceforge.net/tracker/?atid=628964&amp;group_id=101066&amp;func=browse"> https://sourceforge.net/tracker/?atid=628964&amp;group_id=101066&amp;func=browse</a></p>
<p># 2.5.5 MTG &#8211; (2011-07-21)<br />
#    &#8211; Bug &#8211; Typo Ureadable Unreadable config file line 424 &#8211; ID: 3316825<br />
#    &#8211; Bug &#8211; Change &#8220;#!/bin/bash&#8221; to &#8220;#!/usr/bin/env bash&#8221; &#8211; ID: 3292873<br />
#    &#8211; Bug &#8211; problem with excludes &#8211; ID: 3169562<br />
#    &#8211; Bug &#8211; Total disk space on symbolic links &#8211; ID: 3064547<br />
#    &#8211; Added DEBUG option to only print the commands that will be executed.<br />
#    &#8211; Bug &#8211; WHICH command didn&#8217;t work if there was a WHICH alias.<br />
# VER 2.5.4: MTG &#8211; (2011-01-28)<br />
#    &#8211; fixed bug in rsync process.<br />
#    &#8211; Added the ability to backup only a single table by naming the table like<br />
#      database.table<br />
# VER 2.5.2-02:  MTG &#8211; (2010-12-29)<br />
#    &#8211; Added file promission settings (chmod) to directory and file creation points.<br />
# VER 2.5.2-01:  MTG &#8211; (2010-11-06)<br />
#    &#8211; Added &#8216;-R&#8217; to the mysqldump options to include stored procedures in the backup<br />
#      by default. (suggested by Zack Evans)<br />
# VER 2.5.2:  MTG &#8211; (2010-11-04)<br />
#    &#8211; Added option to archive (rsync) the local backup files to a remote locations<br />
#      using the COPYDIR varaible.<br />
#    &#8211; Added option to copy files into a directory based on the hostname using the<br />
#      variable HOSTNAME.  This allows the script to be run from a shared storage directory<br />
#      ( SBM, NFS, NetApp) the data to be kept seperate places.<br />
#    &#8211; Added option to backup all database schemas only using variable FULLSCHEMA.<br />
#    &#8211; Added option to backup MySQL configuration file, my.cnf and remove files older then seven<br />
#      days from the BACKUPDIR directory.<br />
#    &#8211; Added &#8211;master-data=2 and &#8211;single-transaction to include a comment with the master server&#8217;s<br />
#      the binary log coordinates. If used the CHANGE_MASTER_TO line must be uncommented.</p>
<p>The project is at <a href="https://sourceforge.net/projects/automysqlbackup/">https://sourceforge.net/projects/automysqlbackup/</a></p>
<p>You can download my version at <a href="http://www.mysqlfanboy.com/Files/automysqlbackup.sh">http://www.mysqlfanboy.com/Files/automysqlbackup.sh</a></p>
<p>Email me or leave a comment if you have any trouble.</p>
<p><img class="alignleft" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2011%2F07%2Fautomysqlbackup-2-5-5%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=automysqlbackup 2.5.5 - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2011/07/automysqlbackup-2-5-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

