<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mysql4all Blog</title>
	<atom:link href="http://mysql4all.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysql4all.wordpress.com</link>
	<description>Ivan Zoratti&#039;s blog on MySQL and around</description>
	<lastBuildDate>Sat, 21 Jan 2012 01:38:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mysql4all.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/ca01883bc859bc54d90c5456b08a2e3c?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Mysql4all Blog</title>
		<link>http://mysql4all.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mysql4all.wordpress.com/osd.xml" title="Mysql4all Blog" />
	<atom:link rel='hub' href='http://mysql4all.wordpress.com/?pushpress=hub'/>
		<item>
		<title>HA Reloaded &#8211; Many ways to provide High Availability</title>
		<link>http://mysql4all.wordpress.com/2012/01/18/ha-reloaded/</link>
		<comments>http://mysql4all.wordpress.com/2012/01/18/ha-reloaded/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 05:35:12 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL HA]]></category>
		<category><![CDATA[MySQL High Availability]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=78</guid>
		<description><![CDATA[High Availability is one of the hottest topics for MySQL DBAs. As a matter of fact, when we (SkySQL) are called by users and customers, the top two questions for our PS team are: How can I make my MySQL database scalable? How can I make my MySQL database highly available Since MySQL is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=78&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>High Availability is one of the hottest topics for MySQL DBAs. As a matter of fact, when we (<a href="http://www.skysql.com" target="_blank">SkySQL</a>) are called by users and customers, the top two questions for our PS team are:</p>
<ol>
<li>How can I make my MySQL database scalable?</li>
<li>How can I make my MySQL database highly available</li>
</ol>
<p>Since MySQL is the most used online database, these two questions are totally appropriate. Although the two concepts walk together, they should not be confused.</p>
<p>We refer to scalability when we define that a system must sustain a specific workload, measured in different ways &#8211; response time, latency, transactions or operations per second to name few, or a combination of them. So, we define the level of scalability we want to achieve and we design a system that can scale to that level.</p>
<p>We refer to high availability when we define that a system must be available, within the boundaries of the scalability mentioned above, also in case of malfunctions of one or more of its components. The latter, as many of you know, is called fault tolerance.</p>
<div>Developers and administrators tend to confuse scalability and availability and, even worse, approach the availability and the scalability of their systems all in once. This is wrong for the simple reason that the techniques to adopt to achieve high availability are different to the once to achieve scalability. What is true though, is that these techniques must be ultimately work together and a good system design is a constant reiteration of these techniques. up to the fine tuning of all the aspects that are linked together.
</div>
<p>At SkySQL, one of the main goals is to design with our customers scalable and highly available systems. I have seen many presentations on the HA subject and I think most of them are really good &#8211; see the one that Henrik has prepared, for example, highly recommended &#8211; but I wanted to give you our perspective and show you the various options that we have investigated at SkySQL and that we evaluate for community users and for our customers. This is the reason why I have created this presentation, HA Reloaded.</p>
<p>HA Reloaded is a refresh of all the latest options available for MySQL in terms of HA solutions. I have presented a version of it in Seattle, in San Francisco and in Boston in December, next week I will land in New York City. People who know me, also know that I never do the same presentation twice, so if you are around NYC on Mon 23rd and you want to join us, you will find something completely new, even if you have already attended to my preso.</p>
<div>Here are all the details:</div>
<div>
<ul>
<li>The slides of my presentation so far are on slideshare, available <a href="http://www.slideshare.net/izoratti/ha-reloaded" target="_blank">here</a>.</li>
<li>The Meetup in NYC will start on Monday 23rd at 7pm &#8211; the venue is:<br />
General Assembly NY<br />
902 Broadway, 4th Floor<br />
New York, NY 10010</li>
<li>The URL to the MySQL Meetup in NYC is here: <a href="http://www.databasemonth.com/database/high-availability">http://www.databasemonth.com/database/high-availability</a></li>
</ul>
<p>&nbsp;</p>
</div>
<p>For those of you who are attending the User Conference &#8211; no, I have not submitted this speech. As I said, there are already so many HA presos, I hope Henrik Ingo will do a refresh of his presentation and I am sure that our friends at Percona will talk a lot about their new solutions. But enough of this, please come and poke me at the meetup!</p>
<div>/iz</div>
<div></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=78&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2012/01/18/ha-reloaded/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>
	</item>
		<item>
		<title>The SkySQL Reference Architecture at the MySQL UC in Santa Clara</title>
		<link>http://mysql4all.wordpress.com/2011/04/11/the-skysql-reference-architecture-at-the-mysql-uc-in-santa-clara/</link>
		<comments>http://mysql4all.wordpress.com/2011/04/11/the-skysql-reference-architecture-at-the-mysql-uc-in-santa-clara/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 02:17:07 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=74</guid>
		<description><![CDATA[Only few more hours, it is almost here. The long awaited Reference Architecture from SkySQL is going to make its first appearance at the MySQL User Conference in Santa Clara this week. SkySQL is going to contribute to the evolution and innovation of MySQL from both coasts of the United States. A total of 10 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=74&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Only few more hours, it is almost here. The long awaited Reference Architecture from SkySQL is going to make its first appearance at the MySQL User Conference in Santa Clara this week.</p>
<p><a title="SkySQL" href="http://www.skysql.com">SkySQL</a> is going to contribute to the evolution and innovation of MySQL from both coasts of the United States. A total of 10 between presentations, tutorials and events will help the MySQL users in Santa Clara and in Orlando in understanding how they can leverage the use of MySQL, improve performance, scalability and high availability. You can find the complete schedule of the MySQL UC and Collaborate 11 <a href="http://www.marketwire.com/press-release/SkySQL-to-Introduce-Reference-Architecture-at-OReilly-MySQL-Conference-Expo-1423485.htm">here (UC)</a> and <a href="http://collaborate11.ioug.org/Education/MySQL/tabid/133/Default.aspx">here (C11)</a>. Regarding the SkySQL Reference Architecture, information regarding the events and the booth are <a href="http://blogs.skysql.com/">here</a>.</p>
<p>I hope you will stop by on Wednesday at the <a href="http://en.oreilly.com/mysql2011/public/schedule/detail/19897">panel</a> (11.55am &#8211; Ballroom H) or at the launch party (6pm &#8211; Magnolia Ballroom), I will be glad to give you more details and all the information you may need.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=74&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2011/04/11/the-skysql-reference-architecture-at-the-mysql-uc-in-santa-clara/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL User Conference: InnoDB vs NDB &#8211; Let the fight begin!</title>
		<link>http://mysql4all.wordpress.com/2011/04/09/mysql-user-conference-innodb-vs-ndb-let-the-fight-begin/</link>
		<comments>http://mysql4all.wordpress.com/2011/04/09/mysql-user-conference-innodb-vs-ndb-let-the-fight-begin/#comments</comments>
		<pubDate>Sat, 09 Apr 2011 01:59:07 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL UC]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=70</guid>
		<description><![CDATA[While wearing my hat of Sales Engineer, I have been asked several times what is the difference between InnoDB and MySQL Cluster/NDB and when it makes sense to use one storage engine or the other. Some may probably think that this is a trivial question: the two engines are so different that there is really [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=70&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While wearing my hat of Sales Engineer, I have been asked several times what is the difference between InnoDB and MySQL Cluster/NDB and when it makes sense to use one storage engine or the other. Some may probably think that this is a trivial question: the two engines are so different that there is really no point to compare them. The reality is not so clear though: there are many situations where I have found InnoDB stretched to the point where MySQL Cluster would have been a perfect fit, and other occasions were users implemented a solution based on MySQL Cluster and InnoDB would have been the perfect choice.</p>
<p>This is the reason behind my talk at the MySQL User Conference in Santa Clara: InnoDB vs NDB. I will co-present the session with my good old friend and ex-colleague Johan Andersson &#8211; if you know Johan, you may guess who will take the part for NDB! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Rest assured it will be a serious and fair comparison between the two engines, but we will do our best to interact with the audience and to make the session enjoyable.</p>
<p>After the session the slides will be available from the O&#8217;Reilly site and I will continue to provide information regarding this topic from the MySQL4All blog and from the <a title="SkySQL" href="http://www.skysql.com">SkySQL</a> web site.</p>
<p>If you are so lucky to attend the <a title="MySQL User Conference" href="http://en.oreilly.com/mysql2011/">User Conference</a> in Santa Clara this year, please come and join us. If you have questions that you want to raise prior to the presentation and perhaps you would like to topics cover, feel free to send me a message and I will do my best to add the topic to the presentation.</p>
<p>Enjoy the match!</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=70&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2011/04/09/mysql-user-conference-innodb-vs-ndb-let-the-fight-begin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>
	</item>
		<item>
		<title>Yet Again On Subqueries</title>
		<link>http://mysql4all.wordpress.com/2011/01/25/yet-again-on-subqueries/</link>
		<comments>http://mysql4all.wordpress.com/2011/01/25/yet-again-on-subqueries/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 21:39:34 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Server]]></category>
		<category><![CDATA[Subqueries]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=55</guid>
		<description><![CDATA[…with a bit of strategic thinking They come back, every now and then. Subqueries are far from being perfect at MySQL and they can give you some serious headaches. Skilled MySQL developers know it better. They avoid subqueries as much as they can. It is not that subqueries do not work, it is just that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=55&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>…with a bit of strategic thinking</em></p>
<p>They come back, every now and then. Subqueries are far from being perfect at MySQL and they can give you some serious headaches.</p>
<p>Skilled MySQL developers know it better. They avoid subqueries as much as they can. It is not that subqueries do not work, it is just that the optimizer sometimes is, well, &#8220;not that optimised&#8221;.</p>
<p>So you may stay away from subqueries with some good SQL review. But what happens when the subquery is automatically generated by a script or a tool? If you can change the statement, I&#8217;m afraid you need to find some serious workarounds that vary case by case.</p>
<p>Here is an example that I found few weeks ago when I visited one of our customers.</p>
<p>Our customer used <a href="http://www.magentocommerce.com/">Magento</a> for its site. Magento used a couple of queries that I will report here as <em>sales</em> and <em>sales_items</em>, although they are not their real name:</p>
<pre>CREATE TABLE `sales` (</pre>
<pre>   `sales_id`     int(11) NOT NULL,</pre>
<pre>   `sales_entity` int(11) NOT NULL,</pre>
<pre>   `sales_status` int(11) NOT NULL,</pre>
<pre>   PRIMARY KEY (`sales_id`),</pre>
<pre>   KEY `ix2` (`sales_entity`)</pre>
<pre>) ENGINE=InnoDB DEFAULT CHARSET=latin1;</pre>
<pre> </pre>
<pre>CREATE TABLE `sales_items` (</pre>
<pre>   `sales_item_id` int(11) NOT NULL,</pre>
<pre>   `product_id`    int(11) NOT NULL,</pre>
<pre>   `quantity`      int(11) NOT NULL,</pre>
<pre>   PRIMARY KEY (`sales_item_id`),</pre>
<pre>   KEY `ix2` (`product_id`)</pre>
<pre>) ENGINE=InnoDB DEFAULT CHARSET=latin1;</pre>
<pre> </pre>
<p>Both queries had tens of thousands of rows, but in our example I will use only few rows:</p>
<pre>mysql&gt; select * from sales;</pre>
<pre>+----------+--------------+--------------+</pre>
<pre>| sales_id | sales_entity | sales_status |</pre>
<pre>+----------+--------------+--------------+</pre>
<pre>|        1 |            1 |            1 |</pre>
<pre>|        2 |            1 |            2 |</pre>
<pre>|        3 |            2 |            1 |</pre>
<pre>|        4 |            2 |            2 |</pre>
<pre>|        5 |            3 |            1 |</pre>
<pre>|        6 |            3 |            2 |</pre>
<pre>|        7 |            4 |            1 |</pre>
<pre>|        8 |            4 |            2 |</pre>
<pre>|        9 |            5 |            1 |</pre>
<pre>|       10 |            5 |            2 |</pre>
<pre>+----------+--------------+--------------+</pre>
<pre>10 rows in set (0.00 sec)</pre>
<pre> </pre>
<pre>mysql&gt; select * from sales_items;</pre>
<pre>+---------------+------------+----------+</pre>
<pre>| sales_item_id | product_id | quantity |</pre>
<pre>+---------------+------------+----------+</pre>
<pre>|             1 |          1 |        1 |</pre>
<pre>|             2 |          1 |        1 |</pre>
<pre>|             3 |          2 |        1 |</pre>
<pre>|             4 |          2 |        1 |</pre>
<pre>|             5 |          3 |        1 |</pre>
<pre>|             6 |          3 |        1 |</pre>
<pre>+---------------+------------+----------+</pre>
<pre>6 rows in set (0.00 sec)</pre>
<pre> </pre>
<p>The application was running very slow. When we analysed the query log using <a href="http://www.skysql.com/en/products/skysql-enterprise-monitor">SkySQL Enterprise Monitor</a>, we found an UPDATE like this:</p>
<pre>UPDATE sales SET sales_status = ?</pre>
<pre> WHERE sales_entity IN (</pre>
<pre>       SELECT DISTINCT sales_item_id</pre>
<pre>         FROM sales_items</pre>
<pre>        WHERE product_id IN (?)
 )</pre>
<p>The update was executed several times in a minute and it took several seconds to be executed. We already knew that the issue was in the subquery, but just to explain the situation to the customer we wanted to show an execution plan.</p>
<p>As you may know, you cannot use EXPLAIN with and UPDATE statement, therefore we use a SELECT that acts like the UPDATE. This SELECT did the trick:</p>
<pre>SELECT * FROM sales</pre>
<pre> WHERE sales_entity IN (
       SELECT DISTINCT sales_item_id</pre>
<pre>         FROM sales_items</pre>
<pre>        WHERE product_id IN (3)
);</pre>
<pre> </pre>
<pre>+----------+--------------+--------------+</pre>
<pre>| sales_id | sales_entity | sales_status |</pre>
<pre>+----------+--------------+--------------+</pre>
<pre>|        9 |            5 |            1 |</pre>
<pre>|       10 |            5 |            2 |</pre>
<pre>+----------+--------------+--------------+</pre>
<pre>2 rows in set (0.00 sec)</pre>
<pre> </pre>
<p>The execution plan of the query is:</p>
<pre>EXPLAIN SELECT * FROM sales</pre>
<pre>         WHERE sales_entity IN (</pre>
<pre>               SELECT DISTINCT sales_item_id
                 FROM sales_items</pre>
<pre>                WHERE product_id IN (3)
        );</pre>
<pre> </pre>
<pre>+----+--------------------+-------------+-----------------+---------------+---------+---------+------+------+-------------+</pre>
<pre>| id | select_type        | table       | type            | possible_keys | key     | key_len | ref  | rows | Extra       |</pre>
<pre>+----+--------------------+-------------+-----------------+---------------+---------+---------+------+------+-------------+</pre>
<pre>|  1 | PRIMARY            | sales       | ALL             | NULL          | NULL    | NULL    | NULL |   10 | Using where |</pre>
<pre>|  2 | DEPENDENT SUBQUERY | sales_items | unique_subquery | PRIMARY,ix2   | PRIMARY | 4       | func |    1 | Using where |</pre>
<pre>+----+--------------------+-------------+-----------------+---------------+---------+---------+------+------+-------------+</pre>
<pre>2 rows in set (0.00 sec)</pre>
<pre> </pre>
<p>As you can see, the query uses the index in the subquery to retrieve the rows from sales_items, but then it does not use the index on sales_entity in sales. The result is that the UPDATE takes several seconds to be executed, because mysqld performs a full scan of the sales table.</p>
<p>If you want to check the details of this issue, you can have a look at the infamous bug 18826 -  <a href="http://bugs.mysql.com/bug.php?id=18826">http://bugs.mysql.com/bug.php?id=18826</a></p>
<p>So what should you do to fix the problem? If you cannot change the statement, I am afraid there is not much you can do. We were luck and the customer could change the statement. By changing the select with a JOIN that replaces the subquery, something like:</p>
<pre>SELECT sales.* FROM sales JOIN sales_items</pre>
<pre>    ON  (sales.sales_entity = sales_items.sales_item_id )</pre>
<pre> WHERE sales_items.product_id in (3);</pre>
<pre> </pre>
<pre>+----------+--------------+--------------+</pre>
<pre>| sales_id | sales_entity | sales_status |</pre>
<pre>+----------+--------------+--------------+</pre>
<pre>|        9 |            5 |            1 |</pre>
<pre>|       10 |            5 |            2 |</pre>
<pre>+----------+--------------+--------------+</pre>
<pre>2 rows in set (0.00 sec)<span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;"> </span>
<span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;">
</span></pre>
<pre> </pre>
<p>The SELECT gives the same result of the previous SELECT and the EXPLAIN command shows:</p>
<pre>EXPLAIN SELECT sales.* FROM sales JOIN sales_items</pre>
<pre>            ON  (sales.sales_entity = sales_items.sales_item_id )</pre>
<pre>         WHERE sales_items.product_id in (3);</pre>
<pre> </pre>
<pre>+----+-------------+-------------+------+---------------+------+---------+--------------------------------+------+-------------+</pre>
<pre>| id | select_type | table       | type | possible_keys | key  | key_len | ref                            | rows | Extra       |</pre>
<pre>+----+-------------+-------------+------+---------------+------+---------+--------------------------------+------+-------------+</pre>
<pre>|  1 | SIMPLE      | sales_items | ref  | PRIMARY,ix2   | ix2  | 4       | const                          |    2 | Using index |</pre>
<pre>|  1 | SIMPLE      | sales       | ref  | ix2           | ix2  | 4       | test.sales_items.sales_item_id |    1 |             |</pre>
<pre>+----+-------------+-------------+------+---------------+------+---------+--------------------------------+------+-------------+</pre>
<pre>2 rows in set (0.00 sec)</pre>
<pre> </pre>
<p>So <em>ix2</em> can be used to filter the rows in the SELECT, and ultimately in the UPDATE.</p>
<p>In fact, the new UPDATE is:</p>
<pre>UPDATE sales JOIN sales_items
    ON ( sales.sales_entity = sales_items.sales_item_id )</pre>
<pre>   SET sales_status = ?</pre>
<pre> WHERE sales_items.product_id IN ( ? )</pre>
<pre> </pre>
<p>The server tales few milliseconds to execute the query, fixing also the headache of our developers better than a pain killer.</p>
<p>Some people may argue that the use of subqueries is not efficient and developers should learn some good SQL. Unfortunately, this is not the point. Products like Magento and others &#8211; I have primarily in mind BI and reporting tools &#8211; are supposed to be database agnostic and generate queries for many RDBMSs with minor customisation. Bugs like this give the end users the impression that MySQL is terribly slow and is simply not good enough for the job, so they should refer to expensive commercial RDBMSs &#8211; the ones that have subqueries working properly.</p>
<p>I really, really hope that the optimiser team at Monty Program one day will fix this bug. We will see even more adoption of MySQL in the Enterprise world, something that has been always underestimated. More projects in the &#8220;Enterprise world&#8221; mean more resources injected into the MySQL ecosystem, resources (funds, skilled developers and DBAs, expertise) that may be used to improve the product and the solutions around it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=55&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2011/01/25/yet-again-on-subqueries/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle 11g and MySQL Enterprise: get the best of both worlds</title>
		<link>http://mysql4all.wordpress.com/2010/09/22/oracle-mysql-getboth/</link>
		<comments>http://mysql4all.wordpress.com/2010/09/22/oracle-mysql-getboth/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 17:32:59 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle integration]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=45</guid>
		<description><![CDATA[In the last 9 months, every time I visited a customer, or I participated to a meetup group or I simply had a chat with a non-MySQL colleague, I heard the very same question: &#8220;when should I use MySQL and when should I use Oracle?&#8221;. The most audacious dared to ask how difficult it is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=45&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the last 9 months, every time I visited a customer, or I participated to a meetup group or I simply had a chat with a non-MySQL colleague, I heard the very same question: &#8220;when should I use MySQL and when should I use Oracle?&#8221;. The most audacious dared to ask how difficult it is to migrate from one database to another. Some more conservative DBAs and developers asked me if and how it is possible to integrate both database servers in the same environment or solution.</p>
<p>As you can imagine, there are not simple answers to these questions. There are certainly some guidelines that may help in making a decision around the use of MySQL, Oracle, or any other RDBMS.</p>
<h3><strong>When should I use Oracle 11g and when should I use MySQL Enterprise?</strong></h3>
<p>The ultra-simplistic answer can be summarised in:</p>
<ul>
<li>Go for Oracle 11g with ERP and CRM systems, Data Warehouses and sophisticated applications that require lots of features built into the database.</li>
<li>Go for MySQL Enterprise when you want to power Online applications (especially LAMP apps), you need to create &#8220;quick&amp;dirty&#8221;  Data Marts, or you want to easily embedded or bundle the database in your application.</li>
</ul>
<p>Does it mean that I should not use MySQL to power a Data Warehouse? No, I do not mean that, but if you are an Oracle DBA, you may be disappointed in not finding a Parallel Query Option (PQO) or bitmap indexes in MySQL. Or maybe you want to partition a table with 10 billion rows and move these partitions from one table to another, remove one partition for some time and then reattach it to a table. If you manage a relatively small DW with few users, all these features may be irrelevant, but if you have some Terabytes on a proper big iron, you will definitely take these elements into consideration.</p>
<p>Conversely, if you need to create a data mart to do some analysis and reporting, then MySQL may be just perfect. You can install a small VM or a standalone server, have MySQL up and running in minutes and then you can start bulk loading data on MyISAM tables. By the time you are loading your data, your colleage would be on dialog window #23 of the Oracle 11g Installer (if you can manage to set up a proper X11 environment to make it running). Oh, and of course you can pack the MyISAM tables, or you can use a columnar storage engine.</p>
<p>And regarding Online application, just the fact that 16 of 20 top web sites run primarily with MySQL (<a href="http://www.alexa.com/topsite">http://www.alexa.com/topsite</a>s &#8211; just remove Windows Live, MSN, Taobao and Amazon.com from the list) should give you confidence that MySQL is a good choice.</p>
<h3><strong>Should I migrate from one database server to the other?</strong></h3>
<p>It is always possible, but first I strongly recommend to answer to these questions:</p>
<ul>
<li><em>Does my team have the right skills to use and support the destination database?<br />
</em>Sometimes, the learning curve of a database server is not taken into a proper consideration. Developers may use the RDBMS in the wrong way and they may end up with issues, with terrible performance and big nightmares. This is particularly true when CIOs and IT managers think that a migration to MySQL would simply cut the licenses costs. Because MySQL is such a &#8220;simple&#8221; product, there is no need to learn, you just start coding. How wrong is that?</li>
<li><em>Have you considered, in your TCO, the man-time cost of a migration, the review of the infrastructure and the estimated cost of the disruptions caused by a significant change?<br />
</em>The name of the game here is &#8220;underestimation&#8221;. IT managers often underestimate these costs, sometimes by an order of magnitude. They should be very generous in considering quite expensive disruptions, but most of all, they should bring in expertise that can confidently mitigate the risk of a migration (and consider the cost of this expertise). Thankfully, although it was a migration to a NoSQL solution, our friends at <a href="http://engineering.twitter.com/2010/07/cassandra-at-twitter-today.html">Twitter realised the potential impact of a change in technology just in time</a>. <a href="http://gigaom.com/2010/09/08/digg-not-likely-to-give-up-on-cassandra">Others did not realise that on time</a>.</li>
<li><em>A migration may save money but it does not bring any value to the end user. Is it really worth the risk?<br />
</em>Of course, if it is big money, the answer is yes. A new project is definitely preferable to a migration: new and updated features may win the users&#8217; mind to sponsor the move.</li>
</ul>
<h3><strong>Can I really integrate Oracle 11g and MySQL Enterprise today?</strong></h3>
<p>The answer is yes, definitely! But again, you need to understand what you mean for &#8220;integration&#8221;. I have identified three types of integration:</p>
<h4><em>Application integration</em></h4>
<p>Applications can &#8220;easily&#8221; interact with both databases. Things may be difficult if you use some frameworks, but in general you can push and pull data on both servers at the same time. Another typical approach is to use message queues or a common cache &#8211; Memcache may come handy here.</p>
<h4><em>Systems integration</em></h4>
<p>Systems can co-locate instances without any problem and shared storage among the instances can facilitate the integration. You can consider to exchange data through the file system, perhaps by using the CSV storage engine.</p>
<p>Systems integration is also systems management and monitoring integration. For this, you may be interested in knowing more about the use of Oracle Enterprise Manager (OEM) to monitor MySQL. Oracle is working on that and there will be a release expected in the next calendar year. If you need something quicker, you may have a look at the <a href="http://www.pythian.com/documents/pythian-mysql-plug-in-datasheet.pdf">Pythian plug-in</a>.</p>
<h4><em>Data integration </em></h4>
<p>Data integration is probably the most interesting part. I would consider three aspects here:</p>
<ul>
<li><em>Data exchange</em>: it is performed using a typical ETL approach. Both Oracle 11g and MySQL Enterprise can extract and load data in compatible formats &#8211; CSV or logical dumps. Data exchange should then be pretty straightforward.</li>
<li><em>Data replication</em>: there different solutions to this approach, both unidirectional (only from MySQL to Oracle or from Oracle to MySQL) or bidirectional (between the two databases at the same time, although there is no conflict resolution). <a href="http://www.oracle.com/products/middleware/odi/docs/goldengate-datasheet.pdf">Oracle GoldenGate 11g</a> may be a great choice if you need to replicate data from Oracle to MySQL: it is fast, portable and highly scalable. For bidirectional replication, Hit Software provided a software called <a href="http://www.hitsw.com/products_services/dbmoto/DBMoto_Factsheet.pdf">dbMoto</a> that can do the trick &#8211; although you should consider that the replicator runs only on windows at the moment.</li>
<li><em>Real time data access</em>: what about federated data, i.e. accessing data on MySQL from an Oracle database and viceversa? Well, this is possible straight away from Oracle to MySQL by using<a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28277/toc.htm"> Oracle Heterogeneous Services</a> (OHS). From MySQL to Oracle you should use User Defined Functions that use an OCI client to access an Oracle database from a SQL statement. I will try to blog more about this approach.</li>
</ul>
<h3><strong>Where can I find more information?</strong></h3>
<p>The first step may be to take a look at the presentation that I gave last Monday at the Oracle Open World. The slides are available <a href="http://www.slideshare.net/izoratti/ora-mysql-bothgetting-the-best-of-both-worlds-with-oracle-11g-and-mysql-enterprise">here</a>.</p>
<p><a href="http://sheeri.com/">Sheeri Cabral</a> video recorded the presentation and posted it <a href="http://www.youtube.com/watch?v=UKnvzK8OA8g">here</a>.</p>
<p>I will replicate this presentation in Europe on these dates:</p>
<ul>
<li><a href="http://www.mysql.it/news-and-events/events/">28 September in Milan</a></li>
<li><a href="http://www.mysql.com/news-and-events/">29 September in Stockholm</a></li>
<li><a href="http://www.mysql.it/news-and-events/events/">7 October in Rome</a></li>
<li>15 October in Amsterdam</li>
<li>14 December in London</li>
</ul>
<p>I hope to see you there!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=45&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2010/09/22/oracle-mysql-getboth/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>
	</item>
		<item>
		<title>Heading to Oracle Open World</title>
		<link>http://mysql4all.wordpress.com/2010/09/18/heading-to-oracle-open-world/</link>
		<comments>http://mysql4all.wordpress.com/2010/09/18/heading-to-oracle-open-world/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 01:49:42 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=40</guid>
		<description><![CDATA[Today is all airports and flights. The flight between London and San Francisco is not too bad, but I don&#8217;t like long haul flights and for 12 hours I can sympathise with sardines and anchovies… Tomorrow it will be different. The weather looks good, the sessions very interesting. Just few hours to settle, review the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=40&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today is all airports and flights. The flight between London and San Francisco is not too bad, but I don&#8217;t like long haul flights and for 12 hours I can sympathise with sardines and anchovies…</p>
<p>Tomorrow it will be different. The weather looks good, the sessions very interesting. Just few hours to settle, review the presentation and relax a bit before it begins. Then, Oracle Open World is going to open on Sunday evening at the Moscone Center.</p>
<h2>What about MySQL?</h2>
<p>Sunday is all MySQL! We will have opening keynotes from Edward Screven and the MySQL team. We will have technical sessions all afternoon and a closing keynote from Marten Mickos in the evening. The program for MySQL Sunday is <a title="MySQL Sunday" href="http://www.oracle.com/us/openworld/mysql-sunday-078000.html" target="_blank">here</a>.</p>
<p>If you cannot participate in person, I am sure you will find presentations and videos soon after the event.</p>
<h2>My presentation</h2>
<p>I am going to present in the mainstream set of Oracle Open World, On Monday at 5pm Pacific. The topic is &#8220;Getting the best of both worlds with Oracle Database 11g and MySQL Enterprise&#8221; &#8211; details are <a title="Summary" href="http://www.eventreg.com/sb250/sessionDetail.jsp?SID=316918&amp;MASK=r" target="_blank">here</a>.</p>
<p>In the light of the adoption of MySQL in the Enteprise, it is important to find the best ways to integrate Oracle and MySQL. This integration is possible now, but there are many other options to come in the near future.</p>
<h2>Anything else re MySQL at the Oracle Open World?</h2>
<p>Of course there are hundreds of other sessions and a MySQL booth. If you can stop there you will find me and other colleagues of the MySQL team.</p>
<h2>What&#8217;s next?</h2>
<p>Well, will see. September and October are hot months for the business. Lots of presentations in Europe and customers meetings will keep me busy. I hope there will be time to meet many people at the MySQL User Groups and in customers events.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=40&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2010/09/18/heading-to-oracle-open-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>
	</item>
		<item>
		<title>All-GUI MySQL on Mac</title>
		<link>http://mysql4all.wordpress.com/2010/09/11/all-gui-mysql-on-mac/</link>
		<comments>http://mysql4all.wordpress.com/2010/09/11/all-gui-mysql-on-mac/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 20:48:32 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[GUI]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Server]]></category>
		<category><![CDATA[MySQL Workbench]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=20</guid>
		<description><![CDATA[aka &#8220;How to use multiple MySQL Servers and Workbench in Snow Leopard without using Terminal&#8230; and live happily ever after&#8221; The MySQL Community is a world of command-line aficionados. Many people, including myself, show their love to the simple-but-powerful interface of the mysql command-line client, but not everybody is keen to use a bash shell [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=20&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3><em>aka &#8220;How to use multiple MySQL Servers and Workbench in Snow Leopard without using Terminal&#8230; and live happily ever after&#8221;</em></h3>
<p>The MySQL Community is a world of command-line aficionados. Many people, including myself, show their love to the simple-but-powerful interface of the mysql command-line client, but not everybody is keen to use a bash shell and give up its GUI, no matter how powerful the software is.</p>
<p>Until recently, GUI tools for MySQL were half baked solutions: in the end, there was always something that you had to do via the command line. Today, you can install, set up and use MySQL on your Mac with Snow Leopard without using Terminal, at all.</p>
<h3>My Special Needs</h3>
<p>Before digging into the details of the installation, let me describe what I need on my Mac. I use various versions of MySQL and I often need to run 2 or more instances at the same time. I constantly build, install and uninstall versions of MySQL and I need to find a way to quickly remove (or move) one version of MySQL with data, configuration files and all that is related to a specific instance.</p>
<p>Not everybody has complicated environments and multiple instances; for many users, a single installation would be enough. If you are one of these lucky users, you may skip some steps. In any case, everything presented in this article is applicable to 1 or more instances running on a single Mac.</p>
<h3>The Ingredients</h3>
<p>All the software is available on the MySQL Dev site. You will need 2 kits: MySQL Server and MySQL Workbench. I used the latest .dmg archive from <a href="http://dev.mysql.com/downloads">http://dev.mysql.com/downloads</a> and the latest version of Workbench, from here <a href="http://dev.mysql.com/downloads/workbench/5.2.html">http://dev.mysql.com/downloads/workbench/5.2.html</a>. At the time I am preparing this post, the latest versions are MySQL Server 5.6.0-m4 and MySQL Workbench 5.2.27.</p>
<h3>Preparation</h3>
<p>I have my own way of keeping multiple instances on a single mac, and I am sure you can find many others, perhaps they would make even more sense for you. There are some good tools and scripts that may help you (just google a bit or visit confidently Giuseppe Maxia&#8217;s blog: <a href="http://datacharmer.blogspot.com">http://datacharmer.blogspot.com</a>).</p>
<p>In a nushell, my way of keeping everything separated can be described as:</p>
<ul>
<li><em>Select a parent directory:<span style="font-style:normal;"> in my case, I choose <span style="color:#ff0000;">/usr/local</span>. For example, the new version of the server will be available on <span style="color:#ff0000;">/usr/local/mysql-5.5.6-m4-osx10.6-x86_64</span>. Everything related to this version is in there.</span></em></li>
<li><em>Select a data directory:</em> I simply use the data sub-directory in the base directory. For an instance on a laptop, used for basic tests, that would be just fine.</li>
<li><em>Keep the config files in the base directory</em>: For example, the configuration file, by default, would be <span style="color:#ff0000;">/etc/my.cnf</span>. I will use<span style="color:#ff0000;"> /usr/local/mysql-5.5.6-m4-osx10.6-x86_64/my.cnf </span>instead.</li>
<li><em>Select a socket file</em>: in this case, I keep the socket file in the /tmp directory. My suggestion is to use a naming convention, such as mysql-&lt;version&gt;.sock. For example, the socket file for this version would be <span style="color:#ff0000;">mysql-5.6.0-m4.sock</span>.</li>
<li><em>Identify a specific TCP port for your version</em>: avoid the default port (3306) and start from 3307 ore any other port. In this way, your client tools will not accidentally connect to a server because you forget to specify the TCP port.</li>
</ul>
<h3>Cooking Instructions</h3>
<p>Once you have downloaded the software, you are ready to install it. You should start with MySQL Server. When you open the DMG archive, you should see something this:</p>
<div class="wp-caption aligncenter" style="width: 405px"><img title="01-MySQL Server Package" src="http://farm5.static.flickr.com/4111/4979086073_ac1e6268fd.jpg" alt="MySQL Server Package" width="395" height="276" /><p class="wp-caption-text">MySQL Server Package</p></div>
<p>Just doubleclick on the main package and follow the default instructions, and you are done in literally 1 minute.</p>
<p>By default, the package creates a symbolic link to the base directory. You should see a base dir created under <span style="color:#ff0000;">/usr/local</span>. <span style="color:#0000ff;">Finder</span> does not allow you to browse <span style="color:#ff0000;">/usr/local</span>, but if you go do <span style="color:#0000ff;">Go To Folder</span> in the <span style="color:#0000ff;">Go</span> menu, you can insert <span style="color:#ff0000;">/usr/local</span> in the folder text box and see this window:</p>
<div>
<div class="wp-caption aligncenter" style="width: 439px"><img title="02-Go To Folder" src="http://farm5.static.flickr.com/4149/4979086121_2126f9067f.jpg" alt="Go To Folder" width="429" height="149" /><p class="wp-caption-text">Go To Folder</p></div>
</div>
<div>
<div>As you can see, there is a mysql sym link (<span style="color:#ff0000;">/usr/local/mysql</span>) and a new <span style="color:#ff0000;">mysql-5.6.0-m4-osx10.6-x86_64</span>, which is the base directory that you have just installed.</div>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 780px"><img title="03-Local Dir" src="http://farm5.static.flickr.com/4083/4979693888_fe9b92a73f_b.jpg" alt="Local Dir" width="770" height="444" /><p class="wp-caption-text">Local Dir</p></div>
</div>
<div>
<div>
<div>My recommendation is to remove the <span style="color:#ff0000;">mysql</span> link, in order to avoid any confusion with multiple instances. Since the server has been installed with the superuser, you need to retype the superuser password again to remove the link.</div>
<div>Another important point to consider is that the installer has created a base directory owned by the superuser, with <span style="color:#0000ff;">Read/Write</span> access. Standard users have ReadOnly access. You should open the Info dialog (right click on the dir and select <span style="color:#0000ff;">Get Info</span>), then you should grant <span style="color:#0000ff;">Read/Write</span> access to everyone.</div>
</div>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 410px"><img title="04-MySQL Base Dir Info" src="http://farm5.static.flickr.com/4125/4979693970_aaa66f352f_b.jpg" alt="MySQL Base Dir Info" width="400" height="782" /><p class="wp-caption-text">MySQL Base Dir Info</p></div>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 411px"><img title="05-Change to RW" src="http://farm5.static.flickr.com/4109/4979086315_b5e311224d.jpg" alt="Change to RW" width="401" height="408" /><p class="wp-caption-text">Change to RW</p></div>
</div>
<div>
<p>Now it’s time to install MySQL Workbench. This is an even easier task, since you just need to open the DMG archive to expose the application:</p>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="06-MySQL Workbench Package" src="http://farm5.static.flickr.com/4150/4979086423_bec53e36e4.jpg" alt="MySQL Workbench Package" width="500" height="418" /><p class="wp-caption-text">MySQL Workbench Package</p></div>
</div>
<p>The next step is to drag and drop the Workbench icon into your favourite application folder or subfolder.</p>
<div>
<p>Easy as 1..2..3, done. Just double click on <span style="color:#0000ff;">Workbench</span> and you will see the main window:</p>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="07-MySQL Workbench Home Page" src="http://farm5.static.flickr.com/4124/4979086625_8a2c0960bd.jpg" alt="MySQL Workbench Home Page" width="500" height="337" /></dt>
<dd class="wp-caption-dd">MySQL Workbench Home Page</dd>
</dl>
</div>
<div>
<p>The next step is to create a new server instance. Click on the <span style="color:#0000ff;">New Server Instance</span> item on the right side of the main window and you will see this dialog:</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="08-Create New Server Instance" src="http://farm5.static.flickr.com/4152/4979694362_72240f7b98.jpg" alt="Create New Server Instance" width="500" height="339" /></dt>
<dd class="wp-caption-dd">Create New Server Instance</dd>
</dl>
</div>
<div>
<p>The instance will run on your local Mac, so leave the radio button on <span style="color:#0000ff;">localhost</span> selected. By clicking the <span style="color:#0000ff;">Continue</span> button, you will see the next page:</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="09-Create New Server Instance" src="http://farm5.static.flickr.com/4092/4979694444_d536f36550.jpg" alt="Create New Server Instance" width="500" height="339" /></dt>
<dd class="wp-caption-dd">Create New Server Instance</dd>
</dl>
</div>
<div>
<div>As <span style="color:#0000ff;">Connection Name</span>, I used the version of the server (mysql-5.6.0.-m4) and I have selected <span style="color:#0000ff;">Local Socket </span>as <span style="color:#0000ff;">Connection Method</span>. Now you need to specify the socket file and path. I usually leave the file in the <span style="color:#ff0000;">/tmp</span> directory, therefore the file and path would be <span style="color:#ff0000;">/tmp/mysql-5.6.0-m4.sock</span>.</div>
<div>I do not have any relevant information in my instances, so a root access with simple or no password is enough. I use to store it in the Keychain, in order to avoid the request every time I need to open a new connection.</div>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="10-Store Password for Connection" src="http://farm5.static.flickr.com/4154/4979694524_363d590174.jpg" alt="Store Password for Connection" width="362" height="212" /></dt>
<dd class="wp-caption-dd">Store Password for Connection</dd>
</dl>
</div>
<div>
<div>By clicking <span style="color:#0000ff;">Continue</span> on the main dialog window, you will move to a testing page. Here Workbench will try to connect to the server. Since the server is down, you will see a set of errors, they are absolutely fine at this stage.</div>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="11-Testing the DB Connection" src="http://farm5.static.flickr.com/4111/4979694654_3df5f33a5d.jpg" alt="Testing the DB Connection" width="500" height="339" /></dt>
<dd class="wp-caption-dd">Testing the DB Connection</dd>
</dl>
</div>
<p>By clicking <span style="color:#0000ff;">Continue</span>, you will be able to specify the operating system and the package you are using. These combos are already selected for you as <span style="color:#0000ff;">MacOS X</span> and <span style="color:#0000ff;">MySQL Package</span>. When you will open the profile to change some parameters, you will notice that the Installation Type will be different: this is absolutely normal, since Workbench identifies the fact that we have overridden some defaults as a custom installation.</p>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="12-Specifying the OS" src="http://farm5.static.flickr.com/4105/4979694746_edf2b240d4.jpg" alt="Specifying the OS" width="500" height="339" /><p class="wp-caption-text">Specifying the OS</p></div>
<p>When you click <span style="color:#0000ff;">Continue</span>, you will test the host settings and again, you will see some errors, due to the fact that the instance is not running (see image below).</p>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="13-Testing the Host Settings" src="http://farm5.static.flickr.com/4131/4979694870_14da9dc067.jpg" alt="Testing the Host Settings" width="500" height="339" /><p class="wp-caption-text">Testing the Host Settings</p></div>
<p>Another click on the very same button brings you to the <span style="color:#0000ff;">MySQL Config Page</span>. In this page you can specify the version of the server and the path to the configuration file. Personally I am very lazy and with fat fingers, so I prefer to see the software to provide the path for me. I will use the same trick adopted in Finder, i.e. I will type the first or first two directories in the path, then I will click “<span style="color:#0000ff;">&#8230;</span>” to select the rest of the path:</p>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="14-Info About MySQL Conf" src="http://farm5.static.flickr.com/4086/4979695000_34c2332800.jpg" alt="Info About MySQL Conf" width="500" height="339" /><p class="wp-caption-text">Info About MySQL Conf</p></div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="15-Specify Path to the Conf File" src="http://farm5.static.flickr.com/4124/4979695078_219b813e37.jpg" alt="Specify Path to the Conf File" width="500" height="340" /><p class="wp-caption-text">Specify Path to the Conf File</p></div>
<p>Here you can select the base directory and from the base directory you can select a file. My recommendation is to select the <span style="color:#ff0000;">README</span> file:</p>
<div class="wp-caption aligncenter" style="width: 510px"><img title="16-Select README" src="http://farm5.static.flickr.com/4105/4979695160_1f9b9b6cf2.jpg" alt="Select README" width="500" height="292" /><p class="wp-caption-text">Select README</p></div>
</div>
<div>
<p>When you click the <span style="color:#0000ff;">Open</span> button, the <span style="color:#ff0000;">README</span> file and path will fill the Path text box. Now you can change <span style="color:#ff0000;">README</span> with <span style="color:#ff0000;">my.cnf</span>:</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="17-Change README to my.cnf" src="http://farm5.static.flickr.com/4154/4979695274_d49423643d.jpg" alt="Change README to my.cnf" width="500" height="339" /></dt>
<dd class="wp-caption-dd">Change README to my.cnf</dd>
</dl>
</div>
<p>You are ready to click <span style="color:#0000ff;">Continue</span> again. The next page shows you the commands used to administer the server instance. You can leave these commands as is at the moment, you will change them in a minute.</p>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="18-Commands to Manage the Server" src="http://farm5.static.flickr.com/4132/4979087639_b26d35b4b1.jpg" alt="Commands to Manage the Server" width="500" height="339" /></dt>
<dd class="wp-caption-dd">Commands to Manage the Server</dd>
</dl>
</div>
<div>
<p>The last click on <span style="color:#0000ff;">Continue</span> brings you to the final page, where you can give a name to the profile. Again, I used the version and the location to name the profile.</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="19-Create Instance Profile" src="http://farm5.static.flickr.com/4150/4979695494_f1c3576936.jpg" alt="Create Instance Profile" width="500" height="339" /></dt>
<dd class="wp-caption-dd">Create Instance Profile</dd>
</dl>
</div>
<div>
<p>You can finally create the Profile by clicking the <span style="color:#0000ff;">Finish</span> button. The result is a new instance in the <span style="color:#0000ff;">Server Administration</span> area.</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="20-New Instance Created" src="http://farm5.static.flickr.com/4127/4979087877_645bdd7e8a.jpg" alt="New Instance Created" width="500" height="337" /></dt>
<dd class="wp-caption-dd">New Instance Created</dd>
</dl>
</div>
<div>Now you may want to change the way you administer the instance, by selecting more details that were not present in the wizard. You can do so by clicking the <span style="color:#0000ff;">Manager Server Instances</span> item.</div>
<div>The output window shows the connection parameters that have been set in the wizard.</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="21-Manager Server Instances - Connection" src="http://farm5.static.flickr.com/4146/4979695782_87726ffa87.jpg" alt="Manager Server Instances - Connection" width="500" height="403" /><p class="wp-caption-text">Manager Server Instances - Connection</p></div>
<p>By clicking <span style="color:#0000ff;">System Profile</span>, you will see a new set of parameters. Some of them were not present in the previous wizard, but you can review and alter them now. You may have noticed that the <span style="color:#0000ff;">Installation Type</span> is now <span style="color:#0000ff;">Custom</span>, because the path of the configuration file has changed. Now what you should do is to update the start and stop commands in this page, since they still refer to the symbolic link that I removed.</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="22-Manage Server Instances - System Profile" src="http://farm5.static.flickr.com/4148/4979695888_11ba1f5248.jpg" alt="Manage Server Instances - System Profile" width="500" height="403" /></dt>
<dd class="wp-caption-dd">Manage Server Instances &#8211; System Profile</dd>
</dl>
</div>
<div>This is probably the trickiest part of the configuration. In general, the start and stop commands require the privilege of superuser (or you must play more with the owneship and the grants of files and directories). I had lots of problems with the sudo commands and in the end I decided to use a trick. Again, this trick is not great, since it exposes my user password on the local machine, but I do not have any problem with that, so I decided to adopt it. Basically, I added the sudo command to the start and stop lines and I unchecked the checkbox underneath. The result is that I do not rely on the use of two commands combined in one action, but I can confidently test and execute a command in one go.</div>
<div>The final start and stop commands are something like this:</div>
<div><em>Start:</em></div>
<pre>echo mypwd | sudo -S /bin/sh -c "cd /usr/local/mysql-5.6.0-m4-osx10.6-x86_64; bin/mysqld_safe --defaults-file=my.cnf"</pre>
<div><em>Stop:</em></div>
<pre>echo mypwd | sudo -S /bin/sh -c "cd /usr/local/mysql-5.6.0-m4-osx10.6-x86_64; bin/mysqladmin -uroot --socket=/tmp/mysql-5.6.0-m4.sock shutdown"</pre>
<div>The concept is pretty simple: you type a password and you pass it to a sudo command. The command then executes a shell and passes the command string between quotes to the shell. If this explanation does not make sense to you, don’t worry, just replace mypwd with your machine password. Just remember, if you are using special characters, i.e. non digits or letters, you should use the \ symbol as prefix. Hence, the password “<span style="color:#0000ff;">Good Job!</span>” should be “<span style="color:#0000ff;">Good\ Job\!</span>”. You may notice that I have also removed the sudo command completely, just to avoid any misunderstanding.</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="23-Change Start-Stop" src="http://farm5.static.flickr.com/4131/4979695962_34c6a4722e.jpg" alt="Change Start-Stop" width="500" height="440" /><p class="wp-caption-text">Change Start-Stop</p></div>
<p>When you click the <span style="color:#0000ff;">Close</span> button, you are finally ready to go! Now you can doubleclick the new instance profile and Workbench will try to connect to the instance. Again, MySQL is not running, so you should see a dialog that alerts you and you should click <span style="color:#0000ff;">Continue Anyway</span>.</p>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="24-Open a MySQL Instance" src="http://farm5.static.flickr.com/4146/4979088283_1f18ee89b7.jpg" alt="Open a MySQL Instance" width="500" height="373" /><p class="wp-caption-text">Open a MySQL Instance</p></div>
</div>
<p>After few seconds, you will see the main server instance window:</p>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="25-Server Instance Window" src="http://farm5.static.flickr.com/4154/4979088403_b7e1641bb2.jpg" alt="Server Instance Window" width="500" height="337" /><p class="wp-caption-text">Server Instance Window</p></div>
<p>The MySQL Server is stopped and you need to set few more parameters before you can have it up and running. Click the Configuration Item and start with the <span style="color:#0000ff;">General</span> tab. Here you should change the TCP port (as advised, so you will not accidentally connect to any instance by default), the base directory and the data directory. The same trick to select a root directory first is applicable here, since the two directories should be respectively <span style="color:#ff0000;">/usr/local/mysql-5.6.0-m4-osx10.6-x86_64</span> and <span style="color:#ff0000;">/usr/local/mysql-5.6.0-m4-osx10.6-x86_64/data</span>.</p>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="26-Instance Configuration - General" src="http://farm5.static.flickr.com/4126/4979088497_3c7747959b.jpg" alt="Instance Configuration - General" width="500" height="338" /><p class="wp-caption-text">Instance Configuration - General</p></div>
<p>Once you have set the directories, you need to change a network parameter. Click the <span style="color:#0000ff;">Networking</span> tab and specify the socket file as we have previously defined (<span style="color:#ff0000;">/tmp/mysql-5.6.0-m4.sock</span>).</p>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="27-Instance Configuration - Networking" src="http://farm5.static.flickr.com/4131/4979696422_14ec41ed40.jpg" alt="Instance Configuration - Networking" width="500" height="337" /><p class="wp-caption-text">Instance Configuration - Networking</p></div>
<p>Now you can click the <span style="color:#0000ff;">Apply</span> button and create the <span style="color:#ff0000;">my.cnf</span> file for the very first time. The dialog that appears is just a confirmation of the actions to take. You will create the file by clicking <span style="color:#0000ff;">Apply</span> again.</p>
</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="28-Conf File Changes" src="http://farm5.static.flickr.com/4127/4979088649_25ffd8d9ee.jpg" alt="Conf File Changes" width="500" height="217" /><p class="wp-caption-text">Conf File Changes</p></div>
<p>You can finally select the server instance again and click on <span style="color:#0000ff;">Start Server</span>. The first time you start the server, allow your Mac to work for 40-50 seconds or even a minute or so. MySQL needs to create the InnoDB files and it will take a while.</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="29-Open Instance" src="http://farm5.static.flickr.com/4146/4979696546_9b3ec14534.jpg" alt="Open Instance" width="500" height="338" /></dt>
<dd class="wp-caption-dd">Open Instance</dd>
</dl>
</div>
<div>
<p>Finally, you will be rewarded with this screen:</p>
</div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="30-Instance Running" src="http://farm5.static.flickr.com/4090/4979696644_01aeff466c.jpg" alt="Instance Running" width="500" height="338" /><p class="wp-caption-text">Instance Running</p></div>
<div><strong>Congratulations!</strong></div>
<div>Now, you may argue it’s overcomplicated, but again, everything is self contained and you can run as many instances as you like at the same time, without touching the Terminal.</div>
<h3>Enjoy!</h3>
<div>As last bit, you should check the connection parameters set by the wizard, by selecting the new connection on the left and clicking the <span style="color:#0000ff;">Manage Connection</span> option. Here, I would just recommend to give a good name to the connection.</div>
<div>
<div class="wp-caption aligncenter" style="width: 510px"><img title="31-Manage Connection" src="http://farm5.static.flickr.com/4145/4979696708_a3c73feb65.jpg" alt="Manage Connection" width="500" height="279" /><p class="wp-caption-text">Manage Connection</p></div>
</div>
<div>
<p>Now you can close the window and doubleclick the new connection. The query window will appear:</p>
</div>
<div>
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img title="32-Open Connection" src="http://farm5.static.flickr.com/4083/4979088983_cd00251693.jpg" alt="Open Connection" width="500" height="363" /></dt>
<dd class="wp-caption-dd">Open Connection</dd>
</dl>
</div>
<div>
<div>You can now start using the connection, by executing queries or creating objects with the SQL editor or with the data modeler.</div>
<div>But the beauty of Workbench is material for another post!</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=20&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2010/09/11/all-gui-mysql-on-mac/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4111/4979086073_ac1e6268fd.jpg" medium="image">
			<media:title type="html">01-MySQL Server Package</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4149/4979086121_2126f9067f.jpg" medium="image">
			<media:title type="html">02-Go To Folder</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4083/4979693888_fe9b92a73f_b.jpg" medium="image">
			<media:title type="html">03-Local Dir</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4125/4979693970_aaa66f352f_b.jpg" medium="image">
			<media:title type="html">04-MySQL Base Dir Info</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4109/4979086315_b5e311224d.jpg" medium="image">
			<media:title type="html">05-Change to RW</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4150/4979086423_bec53e36e4.jpg" medium="image">
			<media:title type="html">06-MySQL Workbench Package</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4124/4979086625_8a2c0960bd.jpg" medium="image">
			<media:title type="html">07-MySQL Workbench Home Page</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4152/4979694362_72240f7b98.jpg" medium="image">
			<media:title type="html">08-Create New Server Instance</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4092/4979694444_d536f36550.jpg" medium="image">
			<media:title type="html">09-Create New Server Instance</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4154/4979694524_363d590174.jpg" medium="image">
			<media:title type="html">10-Store Password for Connection</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4111/4979694654_3df5f33a5d.jpg" medium="image">
			<media:title type="html">11-Testing the DB Connection</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4105/4979694746_edf2b240d4.jpg" medium="image">
			<media:title type="html">12-Specifying the OS</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4131/4979694870_14da9dc067.jpg" medium="image">
			<media:title type="html">13-Testing the Host Settings</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4086/4979695000_34c2332800.jpg" medium="image">
			<media:title type="html">14-Info About MySQL Conf</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4124/4979695078_219b813e37.jpg" medium="image">
			<media:title type="html">15-Specify Path to the Conf File</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4105/4979695160_1f9b9b6cf2.jpg" medium="image">
			<media:title type="html">16-Select README</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4154/4979695274_d49423643d.jpg" medium="image">
			<media:title type="html">17-Change README to my.cnf</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4132/4979087639_b26d35b4b1.jpg" medium="image">
			<media:title type="html">18-Commands to Manage the Server</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4150/4979695494_f1c3576936.jpg" medium="image">
			<media:title type="html">19-Create Instance Profile</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4127/4979087877_645bdd7e8a.jpg" medium="image">
			<media:title type="html">20-New Instance Created</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4146/4979695782_87726ffa87.jpg" medium="image">
			<media:title type="html">21-Manager Server Instances - Connection</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4148/4979695888_11ba1f5248.jpg" medium="image">
			<media:title type="html">22-Manage Server Instances - System Profile</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4131/4979695962_34c6a4722e.jpg" medium="image">
			<media:title type="html">23-Change Start-Stop</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4146/4979088283_1f18ee89b7.jpg" medium="image">
			<media:title type="html">24-Open a MySQL Instance</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4154/4979088403_b7e1641bb2.jpg" medium="image">
			<media:title type="html">25-Server Instance Window</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4126/4979088497_3c7747959b.jpg" medium="image">
			<media:title type="html">26-Instance Configuration - General</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4131/4979696422_14ec41ed40.jpg" medium="image">
			<media:title type="html">27-Instance Configuration - Networking</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4127/4979088649_25ffd8d9ee.jpg" medium="image">
			<media:title type="html">28-Conf File Changes</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4146/4979696546_9b3ec14534.jpg" medium="image">
			<media:title type="html">29-Open Instance</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4090/4979696644_01aeff466c.jpg" medium="image">
			<media:title type="html">30-Instance Running</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4145/4979696708_a3c73feb65.jpg" medium="image">
			<media:title type="html">31-Manage Connection</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4083/4979088983_cd00251693.jpg" medium="image">
			<media:title type="html">32-Open Connection</media:title>
		</media:content>
	</item>
		<item>
		<title>So Much Work To Do!</title>
		<link>http://mysql4all.wordpress.com/2010/08/26/so-much-work-to-do/</link>
		<comments>http://mysql4all.wordpress.com/2010/08/26/so-much-work-to-do/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 17:29:10 +0000</pubDate>
		<dc:creator>Ivan Zoratti</dc:creator>
				<category><![CDATA[CIO]]></category>
		<category><![CDATA[IT Infrastructure]]></category>
		<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[OSS]]></category>

		<guid isPermaLink="false">http://mysql4all.wordpress.com/?p=11</guid>
		<description><![CDATA[Few weeks ago I was invited to a dinner in Manchester with a group of CIOs. It was the occasion to talk about Open Source and the use of Open Source Software in the Enterprise. The conversation went on for quite a while on what is OSS, why OSS is relevant for an Enterprise and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=11&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Few weeks ago I was invited to a dinner in Manchester with a group of CIOs. It was the occasion to talk about Open Source and the use of Open Source Software in the Enterprise.</p>
<p>The conversation went on for quite a while on what is OSS, why OSS is relevant for an Enterprise and how a relatively large organisation can get benefit from OSS. To me, it was time for a sanity check.</p>
<p>When you work in the OSS world, as many of us do, you tend to forget the fears, the doubts and all in all the deep differences between companies who have embraced OSS and others who have not. I am not referring to Linux as a server platform here, since Linux distributions are nowadays recognised as a great server environment and people tend to forget it is OSS. I refer to OSS in general and to the way OSS is used by developers, IT professionals and end users.</p>
<p>Back to my original subject, i.e. the dinner with the CIOs, I will skip the details of a good Brit meal enjoyed by an Italian who is quite fussy when it is a matter of good cuisine, adding the fact that he is a vegetarian. Sticking to the main point, the conversation went on for quite a while on some basic topics. So, the first question I asked the audience was regarding their experience with OSS. Some CIOs mentioned Firefox, some others Linux, others had in mind the last version of a famous media player that could play any kind of media file, contrary to other closed source products.</p>
<p>My main question to the attendees was: what are your feelings about OSS? Well, many attendees were scared by OSS. They relate open source to some blokes in a garage or to a nerd seated all day (after school) in front of a computer in his bedroom. Too much television and blockbusters, I would say. So, where is quality? Where is the stability and robustness of the code?</p>
<p>I tried to lead the attendees to a ground that could be well understood. Take Microsoft for example. I used the Microsoft vs Mozilla classical comparison: which one is more stable, more secure? Would you say that Internet Explorer is more advanced than Firefox? Does it provide a better usability or compatibility? It was easy to find an agreement here and many people revealed that Firefox is their favourite browser, but they did not consider it as an Open Source Software.</p>
<p>There were some other obvious examples, like the stability, performance and scalability provided by Windows Servers vs Linux. “Would you be scared to install a Linux server in your data centre today?”, that was the question. “No, not anymore”, was the answer in unison. So, from the browser, to the server, you can easily move to a more suitable ground, at least for me, which is MySQL. We have estimated 12M+ MySQL server installations and 16 of the 20 most visited web sites use MySQL as their main relational database, probably generating more transactions than the 16 most important banks in the world. Would you be scare to use MySQL as a relational database? The attendees were still not convinced, but at least I instilled some interest.</p>
<p>Another interesting point was raised when we talked about the lifecycle of OSS. Some attendees believed that OSS is more likely to disappear after few months or years, whilst closed source software is more likely to stay around to longer time. So, here is another question for my audience: “have you ever used products like Vignette, Broadvision, Interwoven or Bluemartini?”. Sad faces stared the empty plates, trying to remember the last time they saw the announcement of a new version of what’s left from these famous brands. Then I asked if they heard about projects running on Apache, JBoss, Drupal or Hibernate in their organisations. A mix of different answers revolted the sad faces to cautious smiles. The message was clear: no matter if the software is open or not, the more the software is used, the more it is likely to stay and be adopted for a long time.</p>
<p>At the end of this experience that I wanted to share, one might wonder what is the lesson to learn here. Well, it is pretty simple.</p>
<p>There is so much to do!</p>
<p>This is the reason why I am [still] so excited to work with MySQL. We have an incredible Community, with amazingly skilled contributors. But in my opinion there is a gap, a broken link between OSS and the Enterprise. This gap is particularly visible with MySQL. This is my main focus and where I want to be. Educate the Enterprise to the use of OSS, with focus on MySQL, of course. The more we attract the Enterprise in a virtuous circle, the more this circle can expand and everybody can benefit from this expansion.</p>
<p>So, enjoy the ride, there is more to come!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mysql4all.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mysql4all.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mysql4all.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mysql4all.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mysql4all.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mysql4all.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mysql4all.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mysql4all.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mysql4all.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mysql4all.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mysql4all.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mysql4all.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mysql4all.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mysql4all.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mysql4all.wordpress.com&amp;blog=10870089&amp;post=11&amp;subd=mysql4all&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mysql4all.wordpress.com/2010/08/26/so-much-work-to-do/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65d5606e4a1a27018f19c304fa988423?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mysql4all</media:title>
		</media:content>
	</item>
	</channel>
</rss>
