<?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>Gary Pendergast &#187; SSL</title> <atom:link href="http://pento.net/tag/ssl/feed/" rel="self" type="application/rss+xml" /><link>http://pento.net</link> <description>I&#039;m on the Internet</description> <lastBuildDate>Thu, 17 May 2012 04:24:17 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <cloud
domain='pento.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' /> <item><title>Replication Checksumming Through Encryption</title><link>http://pento.net/2009/02/16/replication-checksumming-through-encryption/</link> <comments>http://pento.net/2009/02/16/replication-checksumming-through-encryption/#comments</comments> <pubDate>Mon, 16 Feb 2009 22:36:55 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[MySQL]]></category> <category><![CDATA[checksum]]></category> <category><![CDATA[corruption]]></category> <category><![CDATA[replication]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[SSL]]></category> <guid
isPermaLink="false">http://pento.net/?p=78</guid> <description><![CDATA[Problem A problem we occasionally see is Relay Log corruption, which is most frequently caused by network errors. At this point in time, the replication IO thread does not perform checksumming on incoming data (currently scheduled for MySQL 6.x). In the mean time, we have a relatively easy workaround: encrypt the replication connection. Because of [...]]]></description> <content:encoded><![CDATA[<h2>Problem</h2><p>A problem we occasionally see is Relay Log corruption, which is most frequently caused by network errors. At this point in time, the replication IO thread does not perform checksumming on incoming data (currently scheduled for <a
title="MySQL Worklog #2540: Replication event checksums" href="http://forge.mysql.com/worklog/task.php?id=2540">MySQL 6.x</a>). In the mean time, we have a relatively easy workaround: encrypt the replication connection. Because of the nature of encrypted connections, they have to checksum each packet.</p><h2>Solution 1: Replication over SSH Tunnel</h2><p>This is the easiest to setup. You simply need to do the following on the Slave:</p><pre>shell&gt; ssh -f user@master.server -L 4306:master.server:3306 -N</pre><p>This sets up the tunnel. slave.server:4306 is now a tunnelled link to master.server:3306. So now, you just need to alter the Slave to go through the tunnel:</p><pre>mysql&gt; STOP SLAVE;
mysql&gt; CHANGE MASTER TO master_host='localhost', master_port=4306;
mysql&gt; START SLAVE;</pre><p>Everything else stays the same. Your Slave is still connecting to the same Master, just in a different manner.</p><p>This solution does have a couple of downsides, however:</p><ul><li>If the SSH tunnel goes down, it won&#8217;t automatically reconnect. This can be fixed with a small script that restarts the connection if it fails. The script can be added to your init.d setup, so it automatically opens on server startup.</li><li>If you use MySQL Enterprise Monitor, it won&#8217;t be able to recognize that the Master/Slave pair go together.</li></ul><h2>Solution 2: Replication with SSL</h2><p>Replication with SSL can be trickier to setup, but it removes the two downsides of the previous solution. Luckily, the MySQL Documentation Team have done all the hard work for you.</p><ul><li>Step 1: <a
title="MySQL Reference Manual: Setting Up SSL Certificates for MySQL" href="http://dev.mysql.com/doc/refman/en/secure-create-certs.html">Create the certificates</a></li><li>Step 2: <a
title="MySQL Reference Manual: Using SSL Connections" href="http://dev.mysql.com/doc/refman/en/secure-using-ssl.html">Setup the servers to recognize the certificates</a></li><li>Step 3: <a
title="MySQL Reference Manual: Setting Up Replication Using SSL" href="http://dev.mysql.com/doc/refman/en/replication-solutions-ssl.html">Change the Slave to use SSL</a></li></ul><h2>Conclusion</h2><p>If you&#8217;re seeing corruption problems in your Relay Log, but not in your Master Binary Log, try Solution 1. It&#8217;s quick to setup and will determine if encryption is the solution to your problem. If it works, setup Solution 2. It will take a little bit of fiddling around, but is certainly worth the effort.</p> ]]></content:encoded> <wfw:commentRss>http://pento.net/2009/02/16/replication-checksumming-through-encryption/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> </channel> </rss>
