<?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="/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlfanboy.com</link>
	<description>Almost crazy about Opensource / Free  information.</description>
	<lastBuildDate>Fri, 05 Dec 2014 21:29:33 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Where is the Language Data?</title>
		<link>http://www.mysqlfanboy.com/2014/12/where-is-the-language-data/</link>
		<comments>http://www.mysqlfanboy.com/2014/12/where-is-the-language-data/#comments</comments>
		<pubDate>Fri, 05 Dec 2014 21:28:12 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[GIS]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=1082</guid>
		<description><![CDATA[Image if you will,  a geographic database of locations and the language/s spoken there with keys to a dictionary of common words with keys the same word in all other languages.   And again image this database was like a wiki, so it could crowd sourced.  You could put in your own home and &#8220;English spoken [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Image if you will,  a geographic database of locations and the language/s spoken there with keys to a dictionary of common words with keys the same word in all other languages.   And again image this database was like a wiki, so it could crowd sourced.  You could put in your own home and &#8220;English spoken here&#8221;.  And maybe this database would have keys to the words spoken in each language.</p>
<p>If there was an API for this database you could do simple application language translations.  Programs would not need to code tables for translations.  The &#8220;PUSH&#8221; or &#8220;OK&#8221; button would just have a key to that word.  A web app could do IP to GEO lookup and speak your language.  A mobile app could alert you &#8220;French spoken here&#8221;.</p>
<p>Oh and this would need to be FREE and in beer.</p>
<p>Does this exist?  Why not?</p>
<p><img class="alignleft" src="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p>
<p><a href="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp"><img class="alignleft size-medium wp-image-1032" src="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp" alt="MarkGrennanSigniture" width="1" height="1" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>.</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2014%2F12%2Fwhere-is-the-language-data%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Where is the Language Data? - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2014/12/where-is-the-language-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oklahoma City MySQL Group Forming</title>
		<link>http://www.mysqlfanboy.com/2014/07/oklahoma-city-mysql-group-forming/</link>
		<comments>http://www.mysqlfanboy.com/2014/07/oklahoma-city-mysql-group-forming/#comments</comments>
		<pubDate>Tue, 22 Jul 2014 16:06:45 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=1067</guid>
		<description><![CDATA[I&#8217;m excited to learn, just one day before the event, that Oklahoma City has formed a MySQL User Group. OKCMySQL.org July 23, 2014 will be the inaugural meet-up for the OKC MySQL user group. As a special guest speaker, Peter Zaitsev (CEO of Percona and co-author of High Performance MySQL) will be giving a presentation [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m excited to learn, just one day before the event, that Oklahoma City has formed a MySQL User Group. <a href="http://okcmysql.org">OKCMySQL.org</a></p>
<p>July 23, 2014 will be the inaugural meet-up for the OKC MySQL user group. As a special guest speaker, <a href="http://www.percona.com/about-us/our-team/peter-zaitsev"><b>Peter Zaitsev</b></a> (CEO of Percona and co-author of High Performance MySQL) will be giving a presentation on &#8220;<b>Best Indexing Practices</b>&#8220;, followed by a Q/A session.</p>
<p>Time is very short.  <a href="http://www.meetup.com/Oklahoma-City-MySQL-Meetup/">RPVP</a> on Meetup.</p>
<p class="event-where-address subtext">I hope to see you at <a title="" href="http://maps.google.com/maps?f=q&amp;hl=en&amp;q=701+West+Sheridan%2C+Oklahoma+City%2C+OK%2C+73102%2C+us" target="_blank">The Paramount</a> &#8211; 701 West Sheridan, Oklahoma City, OK <span class="event-map-link">(<a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;q=701+West+Sheridan%2C+Oklahoma+City%2C+OK%2C+73102%2C+us" target="_blank">map</a>).</span></p>
<p><img src="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp" alt="" /></p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2014%2F07%2Foklahoma-city-mysql-group-forming%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Oklahoma City MySQL Group Forming - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2014/07/oklahoma-city-mysql-group-forming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Switch project</title>
		<link>http://www.mysqlfanboy.com/2013/10/mysql-switch-project/</link>
		<comments>http://www.mysqlfanboy.com/2013/10/mysql-switch-project/#comments</comments>
		<pubDate>Thu, 24 Oct 2013 17:29:26 +0000</pubDate>
		<dc:creator><![CDATA[mark]]></dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=1048</guid>
		<description><![CDATA[As an old firewall developer, I’m dreaming of a MySQL Switch (MySwitch). You can modify an application to change the database destination. Often the application has to be restarted creating down time. Most servers have many applications connected to them. To make a switch to a Slave server everything has to happen together. Some applications start [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>As an old <a href="http://www.tldp.org/HOWTO/Firewall-HOWTO.html">firewall</a> developer, I’m dreaming of a MySQL Switch (MySwitch).</p>
<p>You can modify an application to change the database destination. Often the application has to be restarted creating down time. Most servers have many applications connected to them. To make a switch to a Slave server everything has to happen together. Some applications start up MUCH slower than others creating more down time.</p>
<p>The purpose of this project is to take control of application/s connections to MySQL servers . I propose using Network Address Translation (NAT) as a “MySQL Switch” (MySwitch) to move applications between servers. Simply stated, the application would not connect directly to the database server. It would instead connect to the MySwitch. The switch would then change the destination address inside the IP packet to direct it to the correct server. Because the source address packet does not change the responding packet would return back to the source application. Of Course nothing is this simple.</p>
<p>Some exceptions to this are; You can’t switch servers in the middle of a conversion. The Slave would have to be make Read/Write before you switch. The slave replication should not be delayed. Sleeping connections should be closed gracefully on the Master. How do you hold off our new connections while the switch is made or can it be made fast enough? No DNS changes have to be made and no IPs have to be moved between servers.</p>
<p>I’m thinking of a Linux project written in C, maybe with a NodeJS web interface. It would document and control the Master / Slave relationships. Perhaps you could point a service at a Master or a leaf Slave and it would build the configuration. At the least you could document the cluster configurations in a JSON file. Maybe the Slave could be configured as the Master and the current state at the time of the switch could be document so turning the old Master into a slave could eased.</p>
<p>Here is a simple outline of what needs to happen.</p>
<ul>
<li>A client, of a client cluster (10.0.0.1) connects to MySwitch (10.0.1.1)</li>
<li>MySwitch changes the destination IP (10.0.1.1) to the correct MySQL server (10.0.2.1)<br />
(MySQL requests are made and returned to the client.)</li>
<li>The admin makes a request to switch to MySQL server (10.0.2.2)</li>
<li>MySwitch checks that the slave (10.0.2.2) is less than ? seconds delayed.</li>
<li>MySwitch starts queuing new connection requests and continues processing all other packet types.</li>
<li>MySwitch checks for connections from the client cluster on the Master (10.0.2.1).</li>
<li>MySwitch</li>
<li>MySwitch closes sleeping connections opened by client cluster members.</li>
<li>MySwitch double checks the slave delay.</li>
<li>MySwitch changes the slave to read write and resets the slave connection.</li>
<li>MySwitch processes all the queued connections to the new MySQL server (10.0.2.2)</li>
</ul>
<p>MySQL commands needed</p>
<p style="padding-left: 30px;"><strong>SHOW SLAVE STATUS\G</strong></p>
<p style="padding-left: 60px;">Check that:<br />
Master_Host: (Master = correct master)<br />
Slave_IO_Running: Yes<br />
Slave_SQL_Running: Yes<br />
Seconds_Behind_Master: 0</p>
<p style="padding-left: 30px;"><strong>SELECT ID FROM information_schema.processlist WHERE host like &#8217;67.67%&#8217; ;</strong></p>
<p style="padding-left: 60px;">This is used to check connections from the “Application Cluster” (67.67) on the Master.</p>
<p style="padding-left: 30px;"><strong>SELECT concat(&#8216;KILL &#8216;,id,&#8217;;&#8217;) FROM information_schema.processlist WHERE host like &#8217;67.67%&#8217; and COMMAND = ‘Sleep’ into outfile &#8216;/tmp/a.txt&#8217;;</strong><br />
<strong> SOURCE /tmp/a.txt;</strong></p>
<p style="padding-left: 60px;">This is used to kill all the open connection for the “Application Cluster” on the Master.</p>
<p style="padding-left: 30px;"><strong>SET GLOBAL READ_ONLY=0;</strong><br />
<strong> RESET SLAVE;</strong></p>
<p style="padding-left: 60px;">These are used to turn off replication on the Slave;</p>
<p><strong>AM I A DREAMER? CAN THIS BE DONE? WHAT AM I MISSING?</strong></p>
<p><a href="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp"><img class="alignleft size-medium wp-image-1032" alt="MarkGrennanSigniture" src="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Related references</strong></p>
<p><a href="http://dev.mysql.com/doc/refman/5.6/en/replication-solutions-switch.html">http://dev.mysql.com/doc/refman/5.6/en/replication-solutions-switch.html<br />
</a><a href="http://www.codepin.org/project/mpp/docs/article1-part1/">http://www.codepin.org/project/mpp/docs/article1-part1/<br />
</a><a href="http://www.ietf.org/rfc/rfc3027.txt">http://www.ietf.org/rfc/rfc3027.txt<br />
</a><a href="http://dev.mysql.com/doc/internals/en/client-server-protocol.html">http://dev.mysql.com/doc/internals/en/client-server-protocol.html<br />
</a><a href="https://www.google.com/patents/US20050086342">https://www.google.com/patents/US20050086342<br />
</a><a href="https://code.google.com/p/mysql-master-ha/">https://code.google.com/p/mysql-master-ha/<br />
</a><a href="http://scriptingmysql.wordpress.com/2012/12/06/using-the-mysql-script-mysqlfailover-for-automatic-failover-with-mysql-5-6-gtid-replication/">http://scriptingmysql.wordpress.com/2012/12/06/using-the-mysql-script-mysqlfailover-for-automatic-failover-with-mysql-5-6-gtid-replication/</a></p>
<p><strong>F5 &#8211; BigIP</strong><br />
<a href="https://devcentral.f5.com/questions/tcp-connection-queuing">https://devcentral.f5.com/questions/tcp-connection-queuing</a><br />
<a href="http://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm_configuration_guide_10_1/ltm_appendixa_monitor_types.html ">http://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm_configuration_guide_10_1/ltm_appendixa_monitor_types.html </a>(Search for MySQL)</p>
<p><strong>IP Queuing</strong><br />
<a href="http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/net/netfilter/nfnetlink_queue.c?v=2.6.25">http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/net/netfilter/nfnetlink_queue.c?v=2.6.25</a></p>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2013%2F10%2Fmysql-switch-project%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=MySQL Switch project - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2013/10/mysql-switch-project/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>You upgraded to &gt; 5.1 but did you turn on performance_schema?</title>
		<link>http://www.mysqlfanboy.com/2013/07/you-upgraded-to-5-1-but-did-you-turn-on-performance_schema/</link>
		<comments>http://www.mysqlfanboy.com/2013/07/you-upgraded-to-5-1-but-did-you-turn-on-performance_schema/#comments</comments>
		<pubDate>Fri, 26 Jul 2013 17:18:37 +0000</pubDate>
		<dc:creator><![CDATA[mark]]></dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=1019</guid>
		<description><![CDATA[If you&#8217;ve upgraded from MySQL 5.1 to a newer version (5.5?  5.6? 5.7?)  Mark Leith shows you why you should turn on performance_schema. Roland Bouman gave us Common_Schema to help improve the SQL user experience.   Mark now lets us look inward at the IO latency to improve the system. Mark has developed a great set of views and procedures to work with performance_schema that can [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;ve upgraded from MySQL 5.1 to a newer version (5.5?  5.6? 5.7?)  <a title="Mark Leith" href="http://www.markleith.co.uk/ps_helper/#top_io_by_file" rel="home">Mark Leith</a> shows you why you should <strong>turn on performance_schema</strong>. <a href="http://rpbouman.blogspot.com/">Roland Bouman</a> gave us <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/introduction.html">Common_Schema</a> to help improve the SQL user experience.   Mark now lets us look inward at the IO latency to improve the system.</p>
<p>Mark has developed a great set of <em>views</em> and <em>procedures</em> to work with <a href="http://dev.mysql.com/doc/mysql/en/performance-schema.html">performance_schema</a> that can give you things like:</p>
<ul>
<li>A list all statements who’s average runtime, in microseconds, are the top 5% slowest</li>
<li>statements that use have done a full table scans</li>
<li>Find indexes that have had no events against them (and hence, no usage)</li>
<li>Show the top disk IO consumers by bytes usage by file</li>
</ul>
<p>You&#8217;ll need to start mysql with the command line &#8211;performance_schema option or add performance_schema=on to your my.cnf and restart the server.  Then download the lattest 5.5 or 5.6 code from Mark&#8217;s page and import it.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;mysql <span style="color: #000000; font-weight: bold;">&amp;</span>lt; ps_helper_56.sql</div></div>
<p>Now you&#8217;re ready to learn things like:</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysql&amp;gt; <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> statements_with_errors_or_warnings;<br />
<span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">-------------------------------------------------------------------+------------+--------+-----------+----------+-------------+----------------------------------+</span><br />
<span style="color: #66cc66;">|</span> query <span style="color: #66cc66;">|</span> exec_count <span style="color: #66cc66;">|</span> errors <span style="color: #66cc66;">|</span> error_pct <span style="color: #66cc66;">|</span> warnings <span style="color: #66cc66;">|</span> warning_pct <span style="color: #66cc66;">|</span> digest <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">-------------------------------------------------------------------+------------+--------+-----------+----------+-------------+----------------------------------+</span><br />
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> currently_ena <span style="color: #66cc66;">...</span> w_instruments <span style="color: #993333; font-weight: bold;">BOOLEAN</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">100.0000</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0.0000</span> <span style="color: #66cc66;">|</span> ad6024cfc2db562ae268b25e65ef27c0 <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> currently_ena <span style="color: #66cc66;">...</span> ents <span style="color: #993333; font-weight: bold;">WHERE</span> enabled <span style="color: #66cc66;">=</span> ? ; <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">50.0000</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0.0000</span> <span style="color: #66cc66;">|</span> 4aac3ab9521a432ff03313a69cfcc58f <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> currently_enabled <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">BOOLEAN</span> show_instruments <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">100.0000</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0.0000</span> <span style="color: #66cc66;">|</span> c6df6711da3d1a26bc136dc8b354f6eb <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> disable_backg <span style="color: #66cc66;">...</span> d <span style="color: #66cc66;">=</span> ? <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">TYPE</span> <span style="color: #66cc66;">=</span> ? ; <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">100.0000</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0.0000</span> <span style="color: #66cc66;">|</span> 12e0392402780424c736c9555bcc9703 <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> currently_enabled <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">12</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0.0000</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">6</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">50.0000</span> <span style="color: #66cc66;">|</span> 44cc7e655d08f430e0dd8f3110ed816c <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> disable_background_threads <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0.0000</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">66.6667</span> <span style="color: #66cc66;">|</span> 0153b7158dae80672bda6181c73f172c <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">CREATE</span> SCHEMA <span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> ps_helper <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">0.0000</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">50.0000</span> <span style="color: #66cc66;">|</span> a12cabd32d1507c758c71478075f5290 <span style="color: #66cc66;">|</span><br />
<span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">-------------------------------------------------------------------+------------+--------+-----------+----------+-------------+----------------------------------+</span></div></div>
<p>&nbsp;</p>
<p><a href="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp"><img class="alignleft size-medium wp-image-1032" alt="MarkGrennanSigniture" src="/wp-content/uploads/2013/07/MarkGrennanSigniture.bmp" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</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%2F2013%2F07%2Fyou-upgraded-to-5-1-but-did-you-turn-on-performance_schema%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=You upgraded to > 5.1 but did you turn on performance_schema? - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2013/07/you-upgraded-to-5-1-but-did-you-turn-on-performance_schema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Percona Live &#8211; MySQL Conference</title>
		<link>http://www.mysqlfanboy.com/2013/04/percona-live-mysql-conference/</link>
		<comments>http://www.mysqlfanboy.com/2013/04/percona-live-mysql-conference/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 01:58:47 +0000</pubDate>
		<dc:creator><![CDATA[Mark Grennan]]></dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=1009</guid>
		<description><![CDATA[This is my takeaway from this years MySQL conference in San Francisco. The community believes Oracle has been a good steward of MySQL and delivered some great code in 5.6. Studies from 451 Research show MySQL is on the decline and a lot of this has to do with the ownership my Oracle and growth of no-SQL. Big data, Cloud, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2013/04/Mark-Grennan.jpg"><img class="alignright size-medium wp-image-1011" alt="Mark Grennan" src="/wp-content/uploads/2013/04/Mark-Grennan-269x300.jpg" width="269" height="300" /></a>This is my takeaway from this years <a href="http://www.percona.com/live/mysql-conference-2013/home">MySQL conference</a> in San Francisco.</p>
<p>The community believes Oracle has been a good steward of MySQL and delivered some great code in 5.6. Studies from <a href="http://bit.ly/451mysql">451 Research</a> show MySQL is on the decline and a lot of this has to do with the ownership my Oracle and growth of no-SQL.</p>
<p>Big data, Cloud, hadoop and MongoDB are still the on the lips of the &#8220;JSON Generation&#8221;.  Marty Weiner and Yashh Nelapati (Pinterest) will tell you to start in the Cloud (Amazon) and grow until you can&#8217;t stand it. Chris Schneider (Ning.com) will tell you there are lots of tools to make hadoop easy to integrator.</p>
<p>As a DBA and System Administrator I see that computer systems are shrinking and CPU densities have reach the point that racking and installing is dead.  Linux Torvald said &#8220;<em>If we are still using the same operating systems and using computers in the same way in 50 or 100 years from now then we have done something wrong</em>&#8220;.  In only five years I think we are starting to see this.  We still have the <a href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)">LAMP</a> stack but  it&#8217;s installed for us by scripts on computers we&#8217;ve never touched.</p>
<p>There was about a 15% growth in attendants this year and maybe a 10% decrease in vendor participation.   This week TokuDB v7 went open source. Still, I feel the community is suffering. Some faces you always expect to see where not there, like <a href="http://www.sheeri.com/">Sheeri</a> who was gone &#8220;&#8230; <em><a href="http://blog.mozilla.org/it/2013/04/25/percona-live-has-no-code-of-conduct/">because I opted to stay home after a crazy year of travel</a>&#8230;&#8221; </em>and may not be back because &#8220;<em>until there is an acceptable Code of Conduct</em>&#8220;.</p>
<p>Everyone had fun at the SkySQL booth having their likness drawn by Doug Shannon of  <a href="http://eventtoons.com/">EventToons</a>  and Julian Cash returned this year to take everyone s photo.</p>
<p>I learned a lot and had fun.  I&#8217;d like to thank <a href="www.ScaleArc.com">ScaleArc</a> for sponsoring my trip this year.  I&#8217;ll be posting more about ScaleArc soon.</p>
<p><img class="alignnone" alt="" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" width="166" height="69" /></p>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2013%2F04%2Fpercona-live-mysql-conference%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Percona Live - MySQL Conference - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2013/04/percona-live-mysql-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ten years of MySQL developer conference</title>
		<link>http://www.mysqlfanboy.com/2013/04/ten-years-of-mysql-developer-conference/</link>
		<comments>http://www.mysqlfanboy.com/2013/04/ten-years-of-mysql-developer-conference/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 20:51:52 +0000</pubDate>
		<dc:creator><![CDATA[Mark Grennan]]></dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=1000</guid>
		<description><![CDATA[This is the tenth year for the MySQL developer conference and my third. I&#8217;ll be posting some news about iDB From ScaleArc. Oracle is back this year. Everyone is fighting with developers wanting to move away from MySQL. And there is lots of talk about 5.6 and working in virtual environments. &#160; &#160; Tweet]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2013/04/IMG_16402.jpg"><img class="size-medium wp-image-1002 alignright" alt="IMG_1640[2]" src="/wp-content/uploads/2013/04/IMG_16402-300x224.jpg" width="300" height="224" /></a></p>
<p>This is the tenth year for the MySQL developer conference and my third.</p>
<p>I&#8217;ll be posting some news about iDB From ScaleArc. Oracle is back this year. Everyone is fighting with developers wanting to move away from MySQL. And there is lots of talk about 5.6 and working in virtual environments.</p>
<p>&nbsp;</p>
<p><img class="alignnone" alt="" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" width="166" height="69" /></p>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2013%2F04%2Ften-years-of-mysql-developer-conference%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Ten years of MySQL developer conference - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2013/04/ten-years-of-mysql-developer-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a MySQL slave with ZERO downtime</title>
		<link>http://www.mysqlfanboy.com/2013/04/making-a-mysql-slave-with-zero-downtime/</link>
		<comments>http://www.mysqlfanboy.com/2013/04/making-a-mysql-slave-with-zero-downtime/#comments</comments>
		<pubDate>Wed, 10 Apr 2013 17:10:32 +0000</pubDate>
		<dc:creator><![CDATA[mark]]></dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=981</guid>
		<description><![CDATA[It’s about time for this year’s MySQL (Percona) conference in San Francisco.  I haven’t written anything in some time.  So, I thought I’d write something we can talk about should you meet me. You need to make a slave of your MySQL server. What if, you’re bonus was tied to database up time or maybe [&#8230;]]]></description>
				<content:encoded><![CDATA[<p dir="ltr">It’s about time for this year’s MySQL (Percona) conference in San Francisco.  I haven’t written anything in some time.  So, I thought I’d write something we can talk about should you meet me.</p>
<p dir="ltr">You need to make a slave of your MySQL server.</p>
<p dir="ltr">What if, you’re bonus was tied to database up time or maybe the systems group will not grant you any down time?  You’re ONE Master DB server is so big, coping tables takes hours. Even an ‘scp’ sync takes too long.  99.999% uptime is hard to achieve.</p>
<p dir="ltr">Percona and their tools are your friend&#8230; mostly. Xtrabackup will create a ready to use copy of all your databases, document your my.cnf and your current Master Position&#8230;  unless it doesn’t.</p>
<p dir="ltr">Xtrabackup uses it’s own XtraDB engine to copy the innodb tables so it doesn’t block master transactions. (Very cool) But that just copies the innodb tables.  All the other files/tables are just copied (cp-ed).</p>
<p dir="ltr">What if, your local disk space is more than 50% full?  You will need to copy it to a different system.  Maybe that space is on a NFS server and maybe that service is mounted with automount.</p>
<p dir="ltr">Now you learn ‘cp’ is not reliable.  (Timeouts? SAN problems? I’m a DBA not a sysadmin and have you read the <a href="http://bofh.ntk.net/BOFH/index.php">bastard operator from hell</a>? )</p>
<p dir="ltr">You learn, Xtrabackup can use ‘scp’.  Now all will go&#8230;  better.  Now it only fails about one out of six times.  You learn a week later when the developers tell you they are getting odd results half the time.</p>
<p dir="ltr">Odd thing, if you start a slave with all the Innodb data intact and all database (directories) but not all the tables, the replication process will not complain.  It will just ignore the missing tables like they were “black holes”.</p>
<p dir="ltr">So you add a backup to your backup script.  (See Below, the part in RED). You use your “fixed” backup script to create a slave. It only takes six hours for the slave to catch up with the master.  All goes well&#8230;  for about a week.</p>
<p>&nbsp;</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOST</span>=<span style="color: #ff0000;">&quot;db01&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">BKDIR</span>=<span style="color: #ff0000;">&quot;/mnt/archive/xtrabackup&quot;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #000000; font-weight: bold;">then</span><br />
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><br />
<span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># archive Old backup</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">DT</span>=<span style="color: #000000; font-weight: bold;">`/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>y-<span style="color: #000000; font-weight: bold;">%</span>m-<span style="color: #000000; font-weight: bold;">%</span>d_<span style="color: #000000; font-weight: bold;">%</span>H-<span style="color: #000000; font-weight: bold;">%</span>M-<span style="color: #000000; font-weight: bold;">%</span>S<span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><span style="color: #000000; font-weight: bold;">/`/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>y<span style="color: #000000; font-weight: bold;">`*</span><br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> zcf <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span>-<span style="color: #007800;">$DT</span>.tgz .<span style="color: #000000; font-weight: bold;">/*</span><br />
<br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Remove old backups</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span>-<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #660033;">-mtime</span> +<span style="color: #000000;">1</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #660033;">-Rf</span> \;<br />
<br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Remove last backup</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-Rf</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><span style="color: #000000; font-weight: bold;">/`/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>y<span style="color: #000000; font-weight: bold;">`*</span><br />
<br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Create backup</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">DT</span>=<span style="color: #000000; font-weight: bold;">`/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>y-<span style="color: #000000; font-weight: bold;">%</span>m-<span style="color: #000000; font-weight: bold;">%</span>d_<span style="color: #000000; font-weight: bold;">%</span>H-<span style="color: #000000; font-weight: bold;">%</span>M-<span style="color: #000000; font-weight: bold;">%</span>S<span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>innobackupex <span style="color: #660033;">--rsync</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><br />
<br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Check for missing files</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">d</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> ^<span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>mysql<br />
<span style="color: #000000; font-weight: bold;">for</span> f <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-regex</span> <span style="color: #ff0000;">&quot;.*\.\(frm\|MYD\|MYI\|MAD|\MAI\|MRG\|TRG\|TRN\|ARM\|ARZ\|CSM\|CSV\|opt\|par\)&quot;</span> <span style="color: #660033;">-printf</span> <span style="color: #ff0000;">&quot;%P<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span> ;<br />
<span style="color: #000000; font-weight: bold;">do</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$d</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$f</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #000000; font-weight: bold;">then</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> coping <span style="color: #007800;">$f</span><br />
rsync <span style="color: #007800;">$f</span> <span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$d</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$f</span><br />
<span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xtrabackup <span style="color: #660033;">--prepare</span> <span style="color: #660033;">--target-dir</span>=<span style="color: #007800;">$BKDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOST</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$d</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> DONE<span style="color: #000000; font-weight: bold;">!</span></div></div>
<p>&nbsp;</p>
<p dir="ltr">You check and&#8230; All the innodb tables are all there.  Only a few “less” critical myisam tables are missing.  You take care of the missing tables with mysqldump. The app guys check again for missing data and NO JOY.   You forgot to restart the mysql slave after you duped/copied the tables and the replication engine doesn’t know about them.</p>
<p dir="ltr"><b></b><b> </b></p>
<p dir="ltr">Again Percona to the rescue. You use PT-Table-Checksum to verify all the tables are in sync with the master. The DIFFS column show all 0 (zeros).  All is good&#8230; or not.  Again you find out from the developers that “some data is missing”.  (They don’t tell you the database or table of course.)</p>
<p>Time for some “old school” testing.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span>mysql <span style="color: #660033;">-h</span> db01 <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;show databases&quot;</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> mysql <span style="color: #660033;">-h</span> db01 <span style="color: #007800;">$x</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;show tables&quot;</span>; <span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; bar<br />
$ <span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span>mysql <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;show databases&quot;</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> mysql <span style="color: #007800;">$x</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;show tables&quot;</span>; <span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; foo<br />
$ <span style="color: #c20cb9; font-weight: bold;">diff</span> foo bar<br />
99a100,<span style="color: #000000;">101</span><br />
<span style="color: #000000; font-weight: bold;">&amp;</span>gt<span style="color: #000000; font-weight: bold;">;;</span> forecast_20130318_1705<br />
<span style="color: #000000; font-weight: bold;">&amp;</span>gt<span style="color: #000000; font-weight: bold;">;;</span> forecast_20130318_2002<br />
105a108<br />
<span style="color: #000000; font-weight: bold;">&amp;</span>gt<span style="color: #000000; font-weight: bold;">;;</span> forecast_gfs_new</div></div>
<p>&nbsp;</p>
<p dir="ltr">Sure enough, you turn up missing and added tables because you’re copy wasn’t quite a “Point in time”.  The developers like to do table renames with their “load data from file” processes.  The myisam data was changing between the time you started your backup and the time you created your slave.</p>
<p dir="ltr">So a few mysqldumps, tables drops, restarts and you got it.</p>
<p dir="ltr"><b id="internal-source-marker_0.5503908840473741"><br />
Do you have weeks like this?</b></p>
<p>&nbsp;</p>
<p><img alt="" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" /></p>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2013%2F04%2Fmaking-a-mysql-slave-with-zero-downtime%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Making a MySQL slave with ZERO downtime - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2013/04/making-a-mysql-slave-with-zero-downtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In place replacement / upgrade &#8211; Redhat and Centos</title>
		<link>http://www.mysqlfanboy.com/2012/11/in-place-replacement-upgrade-redhat-and-centos/</link>
		<comments>http://www.mysqlfanboy.com/2012/11/in-place-replacement-upgrade-redhat-and-centos/#comments</comments>
		<pubDate>Wed, 14 Nov 2012 00:49:20 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=887</guid>
		<description><![CDATA[For many years I have recommended startup companies install and work with CentOS until they need and can afford RedHat Enterprise.  The idea, because the two are binary compatible, the applications the company uses and develops will migrate between the two without changes.  I have even said you can do an inplace migration between them. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>For many years I have recommended startup companies install and work with CentOS until they need and can afford RedHat Enterprise.  The idea, because the two are binary compatible, the applications the company uses and develops will migrate between the two without changes.  I have even said you can do an inplace migration between them.</p>
<p>I’ve been challenged to prove an inplace migration is possible.  This is the results.</p>
<p>There are a couple packages that define a CentOS/Redhat system.</p>
<ul>
<li>The centos/redhat-release package</li>
</ul>
<p><strong></strong><strong>This package hold the release files, product GPG keyes and repository config files.<br />
</strong></p>
<ul>
<li>redhat-logos</li>
</ul>
<p><strong></strong><strong>This file hold the proprietary artwork owned by the vendor.</strong></p>
<p>You might have packages installed not provided by your vendor.  You can list all the vendor names of installed packages with this:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm <span style="color: #660033;">-qa</span> <span style="color: #660033;">--qf</span> <span style="color: #ff0000;">&quot;%{VENDOR} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span></div></div>
<p>Dell Inc<br />
CentOS</p>
<p>In this example “Dell Inc” packages are also installed. You can list the packages installed for a single vendor with this command:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm <span style="color: #660033;">-qa</span> <span style="color: #660033;">--qf</span> <span style="color: #ff0000;">&quot;%{NAME} %{VENDOR} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;Dell Inc&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">' '</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span></div></div>
<p>&nbsp;</p>
<h2 dir="ltr">Migrating CentOS to Redhat</h2>
<p><strong></strong>You’re starting with an existing CentOS system.  I’m using a CentOS 6.2 x86_64 minimum install not updated.  I’m migrating to Redhat Enterprise Server 6.3 x86_64.</p>
<p>Why a minimum install?  Because this is what I recommend for application servers like MySQL.</p>
<p>This process is simplest if you are moving to the next minor release. A migration to the same release (6.2 CentOS to 6.2 RHEL) is possible but will require you manual replace more packages.  I can not recommend a migration to the next major release.  Although a migration from 5.8 to 6.0 might work, configuration files and sometimes whole subsystems are replaced.</p>
<p>To do an update you need a repository to update from.  You can use a local Redhat repository if you have one, or you can use a Redhat CD.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>cdrom<br />
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>cdrom <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>cdrom<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.repo.d<span style="color: #000000; font-weight: bold;">/</span>CentOS<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>root<br />
<span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.repo.d<span style="color: #000000; font-weight: bold;">/</span>rhel.repo</div></div>
<p>Type this into the file.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>rhel<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #007800;">name</span>=redhat enterprise linux<br />
<span style="color: #007800;">baseurl</span>=file:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>cdrom<br />
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">0</span></div></div>
<p>You need to remove just a few files if they exist.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">yum clean</span> all<br />
rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> centos-release<br />
rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> centos-release-cr<br />
rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> centos-indexhtml<br />
rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> redhat-logos<br />
rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> yum-plugin-fastestmirror<br />
rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> yu</div></div>
<p>Now you can install them back from the CD repository.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">yum</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> redhat-release redhat-logos yum-rhn-plugin</div></div>
<p>Then update to the latest release.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">yum update</span></div></div>
<p>Now you need to register/entitle  the server with Redhat.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.repo.d<span style="color: #000000; font-weight: bold;">/</span>rhel.repo</div></div>
<p>REBOOT</p>
<p>To purge your system of the last of the CentOS packages (now that you are registered) do:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">yum</span> reinstall $<span style="color: #7a0874; font-weight: bold;">&#40;</span>rpm <span style="color: #660033;">-qa</span> <span style="color: #660033;">--qf</span> <span style="color: #ff0000;">&quot;%{NAME} %{VENDOR} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;CentOS&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">' '</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>You may still have a few packages left.  The kernel doesn’t get replace unless you force it and some packages are specific to CentOS.  The boot loader for example.  (Do you care?)  In my test I still had:</p>
<p>kernel<br />
libxml2<br />
libxml2-python<br />
plymouth<br />
plymouth-core-libs<br />
plymouth-scripts</p>
<p>How you have upgraded to the next release but you still need to update bug fixes from the Redhat repository.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">yum update</span></div></div>
<p>With all updates, you should go through your system and look for *.rpm.save and *.rpm.new files.  These are created because of changes made to configuration files on your system.  If the OS thinks it can’t safely replace your .conf file with it’s you get a .rpm.new.  If the OS knows it has to replace your .conf file for the application to work you’ll get a .rpm.save.  Either way you should review the differences and correct what’s needed.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> ‘<span style="color: #000000; font-weight: bold;">*</span>.rpm.save’<br />
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> ‘<span style="color: #000000; font-weight: bold;">*</span>.rpm.new’</div></div>
<p>&nbsp;</p>
<h3 dir="ltr">Full install Test</h3>
<p><strong></strong>To really test this process I did a FULL install with 1,858 packages.  I installed CentOS 6.2 and selected every package I could. I didn&#8217;t select virtualization because I was running the test in VMware. I also didn&#8217;t select the mainframe option. (Anyone want to lend me a mainframe?)</p>
<p>The full install went almost as simply as the minimum install except, I had to uninstall firefox before I did the ‘yum update’.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> firefox</div></div>
<p>Of the 1858 packages (not including dependencies) 1077 were updates done by the ‘yum update’ command. This left 1325 packages that were the same release as CentOS.  You could leave them in place.  I found the system worked fine.  I tested many of the stock applications  in X-windows without issues.</p>
<p>The purge of CentOS files with “yum reinstall” also went well.  It found another 1229 packages leaving 97 packages still manufactured by CentOS.  Most of the remaining packages where packages that had Redhat equivalents but the package names didn’t match.  For example:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="319"><strong>CentOS</strong></td>
<td valign="top" width="319"><strong>Redhat</strong></td>
</tr>
<tr>
<td valign="top" width="319">at-spi.x86_64</td>
<td valign="top" width="319">at-spi-1.28.1-2.el6.x86_64</td>
</tr>
<tr>
<td valign="top" width="319">at-spi-python.x86_64</td>
<td valign="top" width="319">at-spi-python-1.28.1.-2.el6.x86_64</td>
</tr>
<tr>
<td valign="top" width="319">redhat-bookmarks</td>
<td valign="top" width="319">redhat-bookmarks-6.1.el6</td>
</tr>
<tr>
<td valign="top" width="319">redhat-lsb-graphics</td>
<td valign="top" width="319">redhat-lsb-graphics-4.0-3.el6</td>
</tr>
<tr>
<td valign="top" width="319">system-config-date</td>
<td valign="top" width="319">system-config-date-1.9.60-1.el6</td>
</tr>
</tbody>
</table>
<p>You can go through by hand and replace these if you are just have to get rid of CentOS 100% or your crazy.  Again, the system works just fine without replacing these files.</p>
<p>Some packages not have a replacement on the CD. Most are like OpenOffice. If you need such a thing you might have just installed the CentOS version anyway.  Maybe these are available in the EPEL repo?</p>
<p>CentOS<br />
autocorr-en ?<br />
ekiga ?<br />
farsight2 ?<br />
gssdp ?<br />
gupng ?<br />
hyphen ?<br />
hyphen-en ?<br />
iwl6000g2b-firmware ?<br />
libnice ?<br />
libpurple ?<br />
libtextcat ?<br />
lpsolve ?<br />
mythes-en ?<br />
opal ?<br />
openchange ?<br />
openoffice ?<br />
pidgin ?<br />
ptlib ?<br />
samba4-libs ?</p>
<h3 dir="ltr">Cruft</h3>
<p dir="ltr">Maybe for my next trick I’ll build a list of files from a CentOS to Redhat install and a straight from CD Redhat install and compare them to see if there are any crumbs left over.</p>
<p>&nbsp;</p>
<h1 dir="ltr">In place upgrade &#8211; Redhat to Centos</h1>
<p><strong id="internal-source-marker_0.45609766501002014">These instructions are from the CentOS Wiki &#8211; <a href="http://wiki.centos.org/HowTos/MigrationGuide">http://wiki.centos.org/HowTos/MigrationGuide</a></strong></p>
<p>To migrate from RHEL6 to CentOS 6 fetch the latest versions of the following packages for your architecture and put them in a temporary directory. Rather than fetching packages with wget, as shown below, the CentOS-6 installation media can be mounted and packages installed from it.<br />
For CentOS 6.2 x86_64</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">yum remove</span> rhnlib abrt-plugin-bugzilla redhat-release-notes<span style="color: #000000; font-weight: bold;">*</span><br />
rpm <span style="color: #660033;">-e</span> <span style="color: #660033;">--nodeps</span> redhat-release redhat-indexhtml<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>mirror.centos.org<span style="color: #000000; font-weight: bold;">/</span>centos<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">6</span><span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>x86_64<span style="color: #000000; font-weight: bold;">/</span>Packages<span style="color: #000000; font-weight: bold;">/</span>centos-release-<span style="color: #000000;">6</span>-<span style="color: #000000;">2</span>.el6.centos.7.x86_64.rpm<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>mirror.centos.org<span style="color: #000000; font-weight: bold;">/</span>centos<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">6</span><span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>x86_64<span style="color: #000000; font-weight: bold;">/</span>Packages<span style="color: #000000; font-weight: bold;">/</span>centos-indexhtml-<span style="color: #000000;">6</span>-<span style="color: #000000;">1</span>.el6.centos.noarch.rpm<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>mirror.centos.org<span style="color: #000000; font-weight: bold;">/</span>centos<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">6</span><span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>x86_64<span style="color: #000000; font-weight: bold;">/</span>Packages<span style="color: #000000; font-weight: bold;">/</span>yum-3.2.29-<span style="color: #000000;">22</span>.el6.centos.noarch.rpm<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>mirror.centos.org<span style="color: #000000; font-weight: bold;">/</span>centos<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">6</span><span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>x86_64<span style="color: #000000; font-weight: bold;">/</span>Packages<span style="color: #000000; font-weight: bold;">/</span>yum-plugin-fastestmirror-1.1.30-<span style="color: #000000;">10</span>.el6.noarch.rpm<br />
rpm <span style="color: #660033;">-Uvh</span> <span style="color: #000000; font-weight: bold;">*</span>.rpm<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<br />
<span style="color: #c20cb9; font-weight: bold;">yum clean</span> all<br />
<span style="color: #c20cb9; font-weight: bold;">yum upgrade</span></div></div>
<p>One might want to download and add a few more look-and-feel items, or load them from the CentOS DVD:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm <span style="color: #660033;">-Uvh</span> redhat-bookmarks-<span style="color: #000000;">6</span>-<span style="color: #000000;">1</span>.el6.centos.noarch.rpm redhat-logos-60.0.14-<span style="color: #000000;">10</span>.el6.centos.noarch.rpm \<br />
redhat-menus-14.0.0-<span style="color: #000000;">3</span>.el6.noarch.rpm redhat-rpm-config-9.0.3-<span style="color: #000000;">34</span>.el6.noarch.rpm</div></div>
<p>With all updates, you should go through your system and look for *.rpm.save and *.rpm.new files.  These are created because of changes made to configuration files on your system.  If the OS thinks it can’t safely replace your .conf file with it’s you get a .rpm.new.  If the OS knows it has to replace your .conf file for the application to work you’ll get a .rpm.save.  Either way you should review the differences and correct what’s needed.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> ‘<span style="color: #000000; font-weight: bold;">*</span>.rpm.save’<br />
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> ‘<span style="color: #000000; font-weight: bold;">*</span>.rpm.new’</div></div>
<p>CentOS Redhat<br />
at-spi.x86_64 at-spi-1.28.1-2.el6.x86_64<br />
at-spi-python.x86_64 at-spi-python-1.28.1.-2.el6.x86_64<br />
redhat-bookmarks redhat-bookmarks-6.1.el6<br />
redhat-lsb-graphics redhat-lsb-graphics-4.0-3.el6<br />
system-config-date system-config-date-1.9.60-1.el6</p>
<p>&nbsp;</p>
<p><img class="alignleft" alt="" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" width="166" height="69" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>.</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2012%2F11%2Fin-place-replacement-upgrade-redhat-and-centos%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=In place replacement / upgrade - Redhat and Centos - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2012/11/in-place-replacement-upgrade-redhat-and-centos/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ScaleArc’s iDB Reviewed</title>
		<link>http://www.mysqlfanboy.com/2012/08/scalearcs-idb-reviewed/</link>
		<comments>http://www.mysqlfanboy.com/2012/08/scalearcs-idb-reviewed/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 16:34:38 +0000</pubDate>
		<dc:creator><![CDATA[mark]]></dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=862</guid>
		<description><![CDATA[Stop coding and start scaling! At the April MySQL conference in San Francisco (2012) I discovered iDB by ScaleArc and was excited by what it can do. After three months of testing and working with ScaleArc I purchased it. What I do The company I work for (WDT Inc.) supplies weather data. From a database [&#8230;]]]></description>
				<content:encoded><![CDATA[<h3><strong>Stop coding and start scaling!</strong></h3>
<p>At the April MySQL conference in San Francisco (2012) I discovered iDB by ScaleArc and was excited by what it can do. After three months of testing and working with ScaleArc I purchased it.</p>
<h3>What I do</h3>
<p>The company I work for (<a href="http://www.wdtinc.com/wdtinc/index.html">WDT Inc</a>.) supplies weather data. From a database point of view, we take in data feeds from many sources with &#8220;Ingest&#8221; applications. All are processed (forecast applications) and provided to many &#8220;Out flow&#8221; applications. Current conditions are processed into forecasts data, RADAR images, lightning and alerts are mapped into images to be used by governments and individual customers (<a href="http://itunes.apple.com/us/app/imapweather-radio/id413511993?mt=8">iPhones</a>). So, we have many applications work with many databases written in many languages.</p>
<p>Coding applications to split read and writes for replication and sharding have been the answer for scaling database access for years. Many companies are working on ways improve replication. The problem with these approaches is they all require code changes. Having been a firewall developer (ipchains), I’ve always thought a proxy was the answer. Think F5-BigIP for databases.</p>
<p>Applications written to work with one MySQL server can&#8217;t scale without re-coding.  If read/write splitting was all iDB did I’d be happy, but iDB can also monitors the transactions, creates metrics and cache transactions.</p>
<h3>Testing</h3>
<p>ScaleArc provided me with a VM version and two 30 day licenses. I installed iDB on two VMware servers along with several types of web applications. (some staging for production) The primary application was an in-house Java applications to process weather alerts. Other application included WordPress, MediaWiki, Cacti and Thinkup.</p>
<p>I also ran sysbench and hammerora against iDB. I used two and three MySQL server, with master / master / slave replication between them.</p>
<p>Most test “Servers” where VMware virtual machines running CentOS 6.0 x64. Some tests were run on production class MySQL servers while iDB ran in a VM.</p>
<h3>Installation</h3>
<p>iDB is designed as an appliance. You can purchase it as hardware, software or a VM. You can have ScaleArc pre-configure iDB for your network. I skipped this, so needed to use a live Linux CD to pop the root password and changed the network configuration.</p>
<p>iDB uses a web interface. The setup process is very intuitive. My installation went well until I tried to install the license key. iDB would not take the key. I turned the problem into ScaleArc support to see how they would respond. I also began to dig into the code and in about two hours solved the problem. I found the startup script was calling the wrong program name.</p>
<p>Within a three days, ScaleArc sent a system engineer, in house, to help with my problem and complete the installation. (I already had it working but I let ScaleArc do it their way to test their support.) The engineer upgraded to a newer version of the iDB server and installed the license key.</p>
<h3>Security</h3>
<p>As a part of digging into ScaleArc’s code, I check iDB’s security. iDB has two methods to authenticate a user. They are, pass through and off load. The default, off load, authenticates the client/application/user itself. Meaning, iDB connects to the database server with a password you give it for that database user. This allows iDB to answer requests from cached queries without connecting to MySQL.</p>
<p>Pass through, as the name implies, just passes the authentication protocol from the client to the server. In this mode iDB can not cache the queries.</p>
<h3>Load Balancing</h3>
<p>iDB lets you setup “Clusters” of servers. You can designate each database server as either Read/Write or Read only.<br />
You can define a cluster as either Round Robin or Dynamic load balancing.</p>
<h3>Caching</h3>
<p>iDB analyzes the traffic passing through it and summarizes it to create analytic data. You can then create expressions to cache queries.</p>
<pre style="padding-left: 30px;">SELECT type FROM `db`\.`settings` WHERE name\=.*</pre>
<p>iDB plots the summarized queries and makes it easy to setup caching rules.</p>
<h3>Inconveniences</h3>
<p>To load balance you need supply iDB with the ID and password of every database user. I’m sure you keep these save somewhere? What about that one, very old, production program that guy (who left two years ago) wrote in Fortran?</p>
<p>MySQL stores a sha1 of each user’s password. After some study I found a way for a proxy to recover the sha1 of the password used by the client. I wrote this up and presented it to ScaleArc. I call it “Transparent Authentication”. ScaleArc has agreed to build this into iDB. I hope to test this soon.</p>
<p>The console doesn’t alway report the current settings. I turned on Access Control List for the cluster and set access to the local LAN only. This creates iptables setting in the underlying Linux server. After changing the access the console didn’t show the iptables setting left. I had to turn off the ACL all together to stop the iptables setting that were left.</p>
<p><strong>Security Issue</strong></p>
<p>I found a number of security problem with ScaleArc. Not all the web pages where protected by iDB security code. I found many test and support scripts in the GUI application that leaked information. I also found a rather scary program that leaked system files. I reported all to ScaleArc.  <span style="text-decoration: underline;">These bugs have been fixed.</span></p>
<h3>Some Application Issues</h3>
<p>I found some applications, like WordPress, report “database issues” if they can’t write to the database right away. It seems the first thing these applications do is log the connection. They do not continue to show the page even though the database can be read.</p>
<h3><strong>Hammerora Test</strong></h3>
<p>All OLTP test ran without a flaw. What more can I say.</p>
<h3>SysBench test</h3>
<p>This test was to review the latency created by iDB. The SysBench, iDB and MySQL all ran on different VMs. All VMs ran on the same hardware. The first test was run direct to the MySQL server and the second through iDB. The MySQL server was not load balanced.</p>
<p>Transactions per second</p>
<p><strong id="internal-source-marker_0.32637589797377586"><img src="https://lh6.googleusercontent.com/b4k_7Hh9_w94eqbNMPOBVFH32mqS__CM2WA-ILFAEHmWNujZduxPD0HcefzD987nDzqdzlUjy4Bim4hhMXZQ-n1s64jSgKuR-k4O8fjrj5Fto1Lp_ck" alt="" width="481px;" height="289px;" /></strong></p>
<p>Average transaction time in milliseconds</p>
<p><strong id="internal-source-marker_0.32637589797377586"><img src="https://lh5.googleusercontent.com/ns650Q29YZpaoT42aiWUb7FqMgzC6VowGZ83d60OLkAOy-v4HIk9xqIGeG1PMiRQxJvb15CWL7VJhForhLTcfIKCNwj83f2RdhFJ-gAIXb3Mjy13dy8" alt="" width="481px;" height="289px;" /></strong></p>
<h3>Conclusion</h3>
<p>ScaleArc’s iDB works! Unlike the MySQL Proxy I could not make iDB fail. Application have no idea they were going through a proxy. Queries went directed to read or write servers as needed. Replication was not affected.</p>
<p>Although the heart of iDB is solid, I did have some trouble with the user interface. I believe iDB may have started life as a command line program. The web UI is good but need work.</p>
<p>ScaleArc support is 100% the are very helpful and willing to listen to their customer. I&#8217;ve found their support has continued to be great after purchase.</p>
<p>When ScaleArc complete the “Transparent Authentication” iDB will truly be a drop-in scaling solution.</p>
<p>&nbsp;</p>
<p><img src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" /></p>
<p>&nbsp;</p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2012%2F08%2Fscalearcs-idb-reviewed%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=ScaleArc’s iDB Reviewed - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2012/08/scalearcs-idb-reviewed/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Indexed CSV</title>
		<link>http://www.mysqlfanboy.com/2012/07/indexed-csv/</link>
		<comments>http://www.mysqlfanboy.com/2012/07/indexed-csv/#comments</comments>
		<pubDate>Thu, 26 Jul 2012 21:24:59 +0000</pubDate>
		<dc:creator><![CDATA[mark]]></dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=854</guid>
		<description><![CDATA[Why is there no index for CSV files?  Indexes are very simple. If the first column of your CSV file is in sorted order you can do a binary search to find your data.  But what if you need to find data in the second or third column? If you have a separate index file [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Why is there no index for CSV files?  Indexes are very simple.</p>
<p>If the first column of your CSV file is in sorted order you can do a binary search to find your data.  But what if you need to find data in the second or third column?</p>
<p>If you have a separate index file pointing to the first byte of each line you could seek to that position in the CSV file and get your data.  Given a file with only your needed column and the byte offset and length of the line you can search the index to find the pointer to the position in the CSV file.</p>
<p><strong>SAMPLE DATA</strong><br />
“record”,”title”,”data”<br />
1,”test1”,”data1”<br />
2,”test3”,”data3”<br />
3,”test2”,”data2”</p>
<p><strong>SAMPLE INDEX</strong><br />
“test1”,24,17<br />
“test2”,58,17<br />
“test3”,41,17<br />
“title”,0,23</p>
<p>Here is a simple perl program to create just such an index.</p>
<pre>#!/usr/bin/perl
# csvindex.pl

use strict;
use warnings;

use Text::CSV_XS;

my $file = $ARGV[0];

my $csv = Text::CSV_XS-&gt;new ({
binary    =&gt; 1,
auto_diag =&gt; 1,
sep_char  =&gt; ','    # not really needed as this is the default
});

open(my $data, '&lt;:encoding(utf8)', $file) or die "Could not open '$file'\n";

my $head = 0;
my $tail = 0 ;

while (my $fields = $csv-&gt;getline( $data )) {
$tail = tell $data ;
printf("\"%s\",%d,%d\n",$fields-&gt;[$ARGV[1]], $head, $tail-$head);
$head = $tail;
}</pre>
<p>This command create an index of the second column (number start with 0).</p>
<pre dir="ltr">$ perl csvindex.pl <a href="/Files/2009.csv">2009.csv</a> 1 | sort &gt; <a href="/Files/2009.cidx">2009.cidx</a></pre>
<p>A binary search can be done with the linux ‘look’ command.</p>
<pre dir="ltr">$ look \"OK\" 2009.cidx
"OK",2134,59</pre>
<p>Here is a simple program to seek into a file and print ‘n’ number of characters.</p>
<pre>#!/usr/bin/perl
# csvseek.pl
use strict;
use warnings;

use Text::CSV_XS;

my $file = $ARGV[0];

open(my $data, '&lt;:encoding(utf8)', $file) or die "Could not open '$file'\n";

seek $data, $ARGV[1], 0 ;

my $line = "" ;

read $data, $line, $ARGV[2];
chomp($line);

print $line . "\n" ;</pre>
<p>Here is how it is used.</p>
<pre dir="ltr">$ perl csvseek.pl  2009.csv 2134 59
OKLAHOMA,OK,40,"4,765","1,251","2,160","1,024",6,"9,206",</pre>
<p>I’d like to see these tools added to CSVKit.</p>
<p>What I’d really like to see is this index/s added to MySQL’s CSV engine.  Would anyone like to help me get this done?</p>
<p><img alt="" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" class="alignleft" width="166" height="69" /></p>
<p><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.mysqlfanboy.com%2F2012%2F07%2Findexed-csv%2F&amp;count=none&amp;via=MySQLFanBoy&amp;related=MySQLFanBoy:Site+Twitter+account&amp;text=Indexed CSV - MySQL Fanboy" class="twitter-share-button">Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlfanboy.com/2012/07/indexed-csv/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
