<?xml version="1.0" encoding="UTF-8"?>

<rss version='2.0'
     xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
    <channel>
        <!-- This XML Feed shows details for the page Planet MySQL -->
        <creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/
          </creativeCommons:license>
        <title>Planet MySQL</title>
        <description>&lt;p&gt;A feed aggregator for MySQL-related Blogs&lt;/p&gt;
</description>
                <category>MySQL</category>
        <category>planet</category>
        <category>blogs</category>

        <pubDate>Thu, 30 Mar 2006 05:56:41 -0800</pubDate>
        <lastBuildDate>Thu, 30 Mar 2006 05:56:41 -0800</lastBuildDate>
            
        <item>
            <title>Finding the needle in your MySQL haystack</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Finding+the+needle+in+your+MySQL+haystack/ccybn</link>
            <description>(first in what will probably be a series of blogs as we move all our projects to a replicated, MySQL 5.0 environment, and I finally get to start playing with all the useful features that come with it)Say you&#039;ve got a client, Mystery Client A. Mystery Client A has hired a marketing consultant. As a part of their rebranding efforts, they have decided to refactor their company spelling convention to MysteryClientA!, for whatever reason. That&#039;s fine for replacing a few logos, but MCA has a database-driven content management system, and their name is riddled throughout the database in page content, event description, news headlines and so forth. Your job is now to sift through the entire system and apply the newly crafted spelling to the entire database. So what do you do?
 ...</description>
            
            <pubDate>Tue, 19 Aug 2008 19:03:09 -0700</pubDate>
        </item>
            
        <item>
            <title>How to unit-test code that interacts with a database</title>
            <link>http://swik.net/MySQL/Planet+MySQL/How+to+unit-test+code+that+interacts+with+a+database/ccybm</link>
            <description>&lt;p&gt;I got some interesting comments on my previous article about &lt;a href=&quot;http://www.xaprb.com/blog/2008/08/18/how-maatkit-benefits-from-test-driven-development/&quot;&gt;unit testing Maatkit&lt;/a&gt;, including echoes of my own conversion to the unit-testing religion.  One of the objections I&amp;#8217;ve heard a lot about unit-testing is how it&amp;#8217;s impossible to test code that talks to a database.  &amp;#8220;It&amp;#8217;s too hard,&amp;#8221; they say.  &amp;#8220;Oh, it&amp;#8217;s easy to test a module that calculates a square root, but a database?  Way too much work!&amp;#8221;&lt;/p&gt;

&lt;h3&gt;Is it really impossible or even hard?&lt;/h3&gt;

&lt;p&gt;I disagree.  In one of my previous articles I said &lt;a href=&quot;http://www.rimmkaufman.com/&quot;&gt;The Rimm-Kaufman Group&lt;/a&gt;, my previous employer, has a comprehensive unit-test suite.  When I say comprehensive I mean it: database interaction is fully tested, too.  I know because I was heavily involved in building it.  Even extremely complex things like big reports that are generated from lots of data are tested.  And believe me, sharding the databases would have been much harder without complete code coverage.  It&amp;#8217;s really not that complicated to unit-test against a database, and it&amp;#8217;s so worth it.  Here are some hints about how you can do this.&lt;/p&gt;

&lt;p&gt;There are many ways to do it, but I&amp;#8217;ll just describe the basics of the system I helped build.  There are several moving parts to the test suite (&amp;#8221;&lt;a href=&quot;http://c2.com/cgi/wiki?SmokeTest&quot;&gt;smoke&lt;/a&gt;&amp;#8220;), but one of them sets a magical environment variable.  And then, all code that connects to a database server magically gets back a different database connection from the create_me_a_connection() function.  This is because there is a database connection abstraction library that respects the environment variable.  It&amp;#8217;s really pretty simple for the most part; instead of doing DBI-&gt;connect(&amp;#8230;) you just call this function, which is a thin wrapper that hands back a connection object.&lt;/p&gt;

&lt;p&gt;This wrapper is itself unit-tested thoroughly, too.  This ensures that when some code is being run from a test, it cannot (I mean cannot!) connect to a production database, and vice versa.  There are some conventions about production and test servers that make sure the abstraction library can tell for sure.  If there&amp;#8217;s any confusion, of course, it will die in a non-recoverable way.  Safety first.&lt;/p&gt;

&lt;h3&gt;Building a good development environment&lt;/h3&gt;

&lt;p&gt;Just as each developer has their own copy of the code from version control, each developer has their own private database server running on the dev machine.  There are some simple conventions that make this possible: Unix user ID plus a constant for the port number, etc.  It&amp;#8217;s really quite easy.  The private database server is a slightly modified version of &lt;a href=&quot;https://launchpad.net/mysql-sandbox&quot;&gt;Giuseppe Maxia&amp;#8217;s MySQL Sandbox tool&lt;/a&gt;.  It can be torn down and set up afresh as desired.  It is wiped clean and re-filled at the start of every test, with a small, tightly focused dataset carefully chosen to represent the conditions the code is supposed to work with.  (Each test has its own dataset).&lt;/p&gt;

&lt;p&gt;If this sounds like a system that can&amp;#8217;t work on a large scale, well, it does.  That&amp;#8217;s the secret sauce that I won&amp;#8217;t reveal in this post.  (It&amp;#8217;s my past employer after all, and I can&amp;#8217;t go revealing everything about them can I?)  You just have to be smart about it.  When a database is central to your business, you either figure out how to get this right, or you pay the consequences in lost time and poor code quality.&lt;/p&gt;

&lt;p&gt;I and the other developers there (another secret: it&amp;#8217;s a small team; &lt;a href=&quot;http://www.craigslist.org/&quot;&gt;small teams build great things&lt;/a&gt;) built several quick utilities to help develop unit tests against a database.  There are utilities to get a minimal necessary dataset for testing and dump it into a file that can be loaded by the test.  There are utilities that can migrate schemas and update the tests to match the schema changes.  And so on, and so on.  This is possible because of careful planning for testability, and really smart things like super-consistent and sensible naming conventions for database objects.  (Ruby On Rails owes a lot of its success to simple things like this, too.  Conventions are really powerful.)  Maybe I&amp;#8217;ll write about the database naming conventions some other time &amp;#8212; I have to credit Alan Rimm-Kaufman a lot for designing those conventions.  It was a stroke of genius.&lt;/p&gt;

&lt;h3&gt;Things to avoid&lt;/h3&gt;

&lt;p&gt;There are several things I &lt;em&gt;do not&lt;/em&gt; recommend doing when you unit-test code that talks to a database.  I&amp;#8217;ll just mention a couple:&lt;/p&gt;

&lt;ul&gt;Don&amp;#8217;t &lt;a href=&quot;http://c2.com/cgi/wiki?MockObject&quot;&gt;mock&lt;/a&gt; anything!  In general I think mocking is the devil.  Most of the mock objects I&amp;#8217;ve ever seen reflected a propensity to &lt;a href=&quot;http://www.xaprb.com/blog/2006/05/16/how-to-refactor-without-rewriting-unit-tests/&quot;&gt;test an implementation instead of a behavior&lt;/a&gt;, which is also the devil.  Write all your code to test a test instance of something real, and do not mock up a database to test against.  It is a rabbit-hole that you will not emerge from easily.&lt;/li&gt;
&lt;li&gt;Never let a test connect to a production database.  Never, ever.  Worlds of hurt will follow.  Not only are you risking your production data, but what about the risk to your code?  You&amp;#8217;re testing against things that will almost certainly change and break your tests; and you&amp;#8217;re possibly polluting your live data with testing data and/or changing live data from the tests.&lt;/li&gt;
&lt;li&gt;I also recommend developing unit tests for your current database functionality if you&amp;#8217;re thinking about changing it much.  &lt;a href=&quot;http://dev.mysql.com/doc/en/server-sql-mode.html&quot;&gt;Don&amp;#8217;t like MySQL&amp;#8217;s lax error handling?  Plan to set the SQL_MODE to something stricter?&lt;/a&gt;  Dive into that database abstraction library and make your tests run in strict mode first by setting SQL_MODE on every new connection that&amp;#8217;s created when running inside a test; fix all the breakage in the test suite; feel sure that your code isn&amp;#8217;t going to break in production.  That was easy!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Summary&lt;/h3&gt;

&lt;p&gt;Once your creative juices get flowing, you&amp;#8217;ll see tons of places your unit test suite can help you out.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re in the Oracle or SQL Server world, or any other world where you can&amp;#8217;t just set up and discard database instances at will due to licensing problems, you&amp;#8217;re going to have to be a little more inventive.  But you can still do it.  (Don&amp;#8217;t you wish you&amp;#8217;d chosen &lt;a href=&quot;http://www.fsf.org/&quot;&gt;Freedom&lt;/a&gt;?)  And unit tests are just as beneficial for apps based on Oracle as they are for MySQL.&lt;/p&gt;

&lt;p&gt;Have fun!  Go forth and test some more!&lt;/p&gt;&lt;a href=&quot;http://www.xaprb.com/blog/tag/mysql/&quot; rel=&quot;tag&quot;&gt;mysql&lt;/a&gt;, &lt;a href=&quot;http://www.xaprb.com/blog/tag/test-driven-development/&quot; rel=&quot;tag&quot;&gt;Test Driven Development&lt;/a&gt;, &lt;a href=&quot;http://www.xaprb.com/blog/tag/testing-a-database/&quot; rel=&quot;tag&quot;&gt;testing a database&lt;/a&gt;, &lt;a href=&quot;http://www.xaprb.com/blog/tag/the-rimm-kaufman-group/&quot; rel=&quot;tag&quot;&gt;The Rimm Kaufman Group&lt;/a&gt;, &lt;a href=&quot;http://www.xaprb.com/blog/tag/unit-testing/&quot; rel=&quot;tag&quot;&gt;unit testing&lt;/a&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 19:03:09 -0700</pubDate>
        </item>
            
        <item>
            <title>Curl Functions for MySQL, v 0.1 released!</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Curl+Functions+for+MySQL%2C+v+0.1+released%21/ccxlo</link>
            <description>I was looking for an example of how to write a MySQL UDF for my upcoming book &quot;Writing Web Applications in Perl, Memcached, MySQL and Apache&quot;, and decided using Curl would be fun. Maybe there are some philosophical issues of why not to do it. But I can do it, and I did do it. So be it ;) Once I started the idea, I had to at least finish it. I hate not finishing something.&lt;br/&gt;&lt;br/&gt;The single function is http_get(). It&#039;s very simple -- it just fetches a url (doesn&#039;t yet take the &quot;http&quot; part, it&#039;s _that_ simple). This severely needs to be fleshed out. &lt;br/&gt;&lt;br/&gt;So, the proof in the pudding is at: &lt;a href=&quot;http://patg.net/http_get.txt&quot;&gt;http://patg.net/http_get.txt&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;A Launchpad project: &lt;a href=&quot;https://launchpad.net/curludfs&quot;&gt;https://launchpad.net/curludfs&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Code: &lt;a href=&quot;http://patg.net/downloads/curl_functions_mysql-0.1.tar.gz&quot;&gt;http://patg.net/downloads/curl_functions_mysql-0.1.tar.gz&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I&#039;d entertain anyone wanting to contribute!</description>
            
            <pubDate>Tue, 19 Aug 2008 14:49:11 -0700</pubDate>
        </item>
            
        <item>
            <title>Announcement: The Pythian Group and Open Query: Partners</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Announcement%3A+The+Pythian+Group+and+Open+Query%3A+Partners/ccxln</link>
            <description>&lt;p&gt;&lt;a href=&quot;http://openquery.com.au/&quot;&gt;&lt;img src=&quot;http://openquery.com.au/files/barlow_logo.jpg&quot;/&gt;&lt;/a&gt;&lt;br/&gt;
I&amp;#8217;d like to share some great news &amp;#8212; &lt;a href=&quot;http://www.pythian.com&quot;&gt;The Pythian Group&lt;/a&gt; and &lt;a href=&quot;http://openquery.com.au/company/about&quot;&gt;Open Query&lt;/a&gt; have become partners!&lt;/p&gt;
&lt;p&gt;Open Query is a leading provider of high-quality MySQL, PostgreSQL and related training in Australia and New Zealand. They  offer consulting services too, and are also known for their MySQL Graph Storage Engine. Feel free to browse through &lt;a href=&quot;http://openquery.com.au/&quot;&gt;Open Query web-site&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;Open Query was founded by &lt;a href=&quot;http://openquery.com.au/company/people&quot;&gt;Arjen Lentz&lt;/a&gt;, who was employee number 25 at MySQL AB. If you follow the MySQL community then I&amp;#8217;m sure you  already read &lt;a href=&quot;http://arjen-lentz.livejournal.com/&quot;&gt;Arjen&amp;#8217;s blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Since you&amp;#8217;re reading this blog, I guess you probably already know what Pythian does, but if you want to learn more,  please click through to &lt;a href=&quot;http://www.pythian.com&quot;&gt;our home page&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Together with Open Query, we are going to extend our service offerings and strengthen our positions in outsourced database management services, consulting, and training.&lt;/p&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 14:49:10 -0700</pubDate>
        </item>
            
        <item>
            <title>Getting Rich Fast ?</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Getting+Rich+Fast+%3F/ccxbi</link>
            <description>&lt;p&gt;&lt;a href=&quot;http://pooteeweet.org/blog/0/1277#m1277&quot;&gt;Lukas Kahwe Smith &lt;/a&gt; has an awesome post titled &quot;Open Source is not making enough rich people richer&quot; .&lt;br/&gt;
Indeed, there is much talk that the VC&#039;s , the Investors and different others aren&#039;t seeing the big money fast enough, according to them that is.&lt;br/&gt;
Does that mean that the open source industry is going bad ?  Does that mean you can&#039;t make a living when working in the Open Source industry ? &lt;/p&gt;
&lt;p&gt;Absolutely not, as he points out there are uncountable people gaining a good living with Open Source,  developers working on the different projects as their day job, system administrators managing open source platforms. &lt;a href=&quot;http://www.inuits.be&quot;&gt;We&lt;/a&gt; are helping out customers to implement Open Source and Free Software.   And there are numerous other Drupal, Mysql, Xen, shops out there.  Some have their own open source products and create a business on top of that , others are supporting popular platforms locally.&lt;/p&gt;
&lt;p&gt;Lots of other companies are innovating on top of Open Source,  they are using the LAMP stack or just Linux as an OS to build their products on they need the stability and the features an Open Source stack provides them with and only in this way they can deliver their customers with a stable and cost effective platform.  Lots of these companies contribute back to the open source community (sadly some don&#039;t ..yet) .   &lt;/p&gt;
&lt;p&gt;But at the end of the day there is much more money involved in the Opensource world than  the money   the Open Source product vendors like RedHat, Alfresco, Zimbra, Zenoss and are getting  from &lt;i&gt;selling&lt;/i&gt; their products.  &lt;/p&gt;
&lt;p&gt;And that&#039;s what counts !!&lt;/p&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 13:12:09 -0700</pubDate>
        </item>
            
        <item>
            <title>A few seats still left for DRBD Performance Tuning webinar</title>
            <link>http://swik.net/MySQL/Planet+MySQL/A+few+seats+still+left+for+DRBD+Performance+Tuning+webinar/ccxbh</link>
            <description>&lt;div class=&quot;snap_preview&quot;&gt;&lt;br/&gt;&lt;p&gt;For those of you interested in getting maximum performance out of your DRBD-based HA clusters, I am hosting a webinar on the subject on Wednesday, 8/27 at 1800 UTC (2pm Eastern, 11am Pacific).&lt;/p&gt;
&lt;p&gt;The webinar is offered free of charge and it&amp;#8217;s already pretty tight in terms of attendance, the event being limited to a maximum of 60 attendees. But if you&amp;#8217;re quick, you might still stand a chance of grabbing a front-row seat. Check out &lt;a title=&quot;Webinar info&quot; href=&quot;http://www.linbit.com/en/education/live-webinars/drbd-performance-tuning-2008-08-27/&quot;&gt;this page on our website&lt;/a&gt;, it has all the relevant information.&lt;/p&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/categories/fghaas.wordpress.com/77/&quot;/&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/tags/fghaas.wordpress.com/77/&quot;/&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/fghaas.wordpress.com/77/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/fghaas.wordpress.com/77/&quot;/&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/fghaas.wordpress.com/77/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/fghaas.wordpress.com/77/&quot;/&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/fghaas.wordpress.com/77/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/fghaas.wordpress.com/77/&quot;/&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/fghaas.wordpress.com/77/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/fghaas.wordpress.com/77/&quot;/&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/fghaas.wordpress.com/77/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/fghaas.wordpress.com/77/&quot;/&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=fghaas.wordpress.com&amp;blog=1182330&amp;post=77&amp;subd=fghaas&amp;ref=&amp;feed=1&quot;/&gt;&lt;/div&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 13:12:08 -0700</pubDate>
        </item>
            
        <item>
            <title>Two for the price of one</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Two+for+the+price+of+one/ccw0p</link>
            <description>&lt;p&gt;Haven&amp;#8217;t done any sneaky puzzles in a while. How would you accomplish this?&lt;/p&gt;
&lt;pre&gt;mysql&gt; CREATE TABLE t1 (id int);
Query OK, 0 rows affected (0.08 sec)

mysql&gt; INSERT INTO t1 VALUES (1);
Query OK, 1 row affected (0.02 sec)

mysql&gt; SELECT COUNT(*) FROM t1;
+----------+
| COUNT(*) |
+----------+
|        2 |
+----------+
1 row in set (0.00 sec)&lt;/pre&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 11:35:00 -0700</pubDate>
        </item>
            
        <item>
            <title>Last Week For Database Survey</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Last+Week+For+Database+Survey/ccwpd</link>
            <description>&lt;p&gt;This is the last week to participate in a &lt;a href=&quot;http://mysqldbnews.blogspot.com/2008/07/please-take-25-question-survey.html&quot;&gt;database usage survey&lt;/a&gt;. If you haven&#039;t already done so, please take a few minutes to answer 25 questions.&lt;/p&gt;
&lt;p&gt;LewisC&lt;/p&gt;
&lt;p class=&quot;zoundry_raven_tags&quot;&gt;
  
  &lt;span class=&quot;ztags&quot;&gt;&lt;span class=&quot;ztagspace&quot;&gt;Technorati&lt;/span&gt; : &lt;a href=&quot;http://www.technorati.com/tag/database&quot; class=&quot;ztag&quot; rel=&quot;tag&quot;&gt;database&lt;/a&gt;, &lt;a href=&quot;http://www.technorati.com/tag/mysql&quot; class=&quot;ztag&quot; rel=&quot;tag&quot;&gt;mysql&lt;/a&gt;, &lt;a href=&quot;http://www.technorati.com/tag/survey&quot; class=&quot;ztag&quot; rel=&quot;tag&quot;&gt;survey&lt;/a&gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://feeds.feedburner.com/~a/MysqlDatabaseNews?a=tXhnoa&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~a/MysqlDatabaseNews?i=tXhnoa&quot; border=&quot;0&quot;&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/MysqlDatabaseNews/~4/369065561&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 09:41:29 -0700</pubDate>
        </item>
            
        <item>
            <title>The key to accessing your data: MySQL Connectors and bindings for various languages</title>
            <link>http://swik.net/MySQL/Planet+MySQL/The+key+to+accessing+your+data%3A+MySQL+Connectors+and+bindings+for+various+languages/ccwo9</link>
            <description>&lt;p&gt;Being able to use an Open Source DBMS to manage your data is nice, but what good would it be if you can&#039;t easily access it from your applications? One key factor to the popularity of MySQL is probably its wide range of available language bindings, which started with support for C, PHP and Perl from early on.&lt;/p&gt;
&lt;p&gt;I&#039;ve tried to gather a list of languages and their respective MySQL drivers/modules below. It&#039;s by no means complete or exhaustive, but I think I covered quite a lot of popular as well as exotic programming languages.&lt;/p&gt;
&lt;p&gt;There is a number of connectors which are actually developed by the Sun Database Group (aka MySQL) itself and that are ready to use:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/odbc/&quot;&gt;Connector/ODBC&lt;/a&gt; - Standardized database driver Windows, Linux, Mac OS X, and Unix platforms.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/j/&quot;&gt;Connector/J&lt;/a&gt; - Standardized database driver for Java platforms and development.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/net/&quot;&gt;Connector/Net -&lt;/a&gt; Standardized database driver for .NET platforms and development.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/mxj/&quot;&gt;Connector/MXJ&lt;/a&gt; - MBean for embedding the MySQL server in Java applications.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/php-mysqlnd/&quot;&gt;MySQL native driver for PHP - mysqlnd&lt;/a&gt; - The MySQL native driver for PHP is an additional, alternative way to connect from PHP 6 to the MySQL Server 4.1 or newer.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/c.html&quot;&gt;libmysql&lt;/a&gt; - The original implementation of the MySQL Client/Server protocol (in C). This library is the basis for a large number of client libraries for other languages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to the above, there are several other connectors developed by Sun/MySQL, which are still under development:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://forge.mysql.com/wiki/Connector_OpenOffice&quot;&gt;MySQL Connector/OpenOffice.org&lt;/a&gt; - a driver that allows you to connect to MySQL with OpenOffice.org natively, without having to use JDBC/ODBC.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://forge.mysql.com/wiki/PHP_PDO_MYSQLND&quot;&gt;PHP PDO mysqlnd&lt;/a&gt; - a PHP/PDO driver based on the mysqlnd driver&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://forge.mysql.com/wiki/Connector_C%2B%2B&quot;&gt;Connector C++&lt;/a&gt;: a driver for C++ applications that uses an API similar to the &lt;a rel=&quot;nofollow&quot; title=&quot;http://java.sun.com/products/jdbc/download.html#corespec30&quot; class=&quot;external text&quot; href=&quot;http://java.sun.com/products/jdbc/download.html#corespec30&quot;&gt;JDBC 3.0 API&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But it&#039;s not only us who develop language bindings for the MySQL server. There is an abundance of drivers that are developed and maintained by the Community, independently from Sun/MySQL (but sometimes with support or guidance from MySQL engineers). The list below is not sorted in any particular order other than the sequence in how I found them over time:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://search.cpan.org/dist/DBD-mysql/&quot;&gt;DBD::mysql&lt;/a&gt; - a MySQL driver for the &lt;a href=&quot;http://search.cpan.org/dist/DBI/&quot;&gt;DBI&lt;/a&gt; database abstraction layer of &lt;a href=&quot;http://perl.org/&quot;&gt;Perl&lt;/a&gt; scripting language. There used to be a a native driver named &amp;quot;&lt;a href=&quot;http://search.cpan.org/%7Ejwied/Msql-Mysql-modules-1.2219/&quot;&gt;Msql-Mysql-modules&lt;/a&gt;&amp;quot;, but it does not seem to be maintained anymore.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://search.cpan.org/dist/Net-MySQL/MySQL.pm&quot;&gt;Net::MySQL&lt;/a&gt; - an implementation of the MySQL Client/Server Protocol in Perl (does not require the MySQL client library). There also is &lt;a href=&quot;http://search.cpan.org/dist/MySQL-Packet/lib/MySQL/Packet.pm&quot;&gt;MySQL::Packet&lt;/a&gt;, a Perl module that can encode and decode the binary protocol.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://mysql-python.sourceforge.net/&quot;&gt;MySQLdb&lt;/a&gt; - a MySQL driver for the &lt;a href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt; scripting language.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://php.net/mysqli&quot;&gt;mysqli, ext/mysqli&lt;/a&gt; - MySQL Improved Extension for PHP&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://php.net/mysql&quot;&gt;mysql, ext/mysql&lt;/a&gt; - MySQL Extension for PHP&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://php.net/pdo_mysql&quot;&gt;PDO_MYSQL&lt;/a&gt; - MySQL PDO driver for PHP&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://tmtm.org/en/mysql/ruby/&quot;&gt;MySQL/Ruby&lt;/a&gt; - the MySQL API module for Ruby, based on the libmysql C library.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://tmtm.org/en/ruby/mysql/README_en.html&quot;&gt;Ruby/MySQL&lt;/a&gt; - the MySQL Ruby API, implemented in Ruby.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://tangentsoft.net/mysql++/&quot;&gt;MySQL++&lt;/a&gt; - a C++ wrapper for MySQL&#039;s C API. It is built around the same principles as the Standard C++ Library, to make dealing with the database as easy as dealing with STL containers.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.alhem.net/project/mysql/&quot;&gt;MySQL wrapped&lt;/a&gt; - another C++ wrapper for the MySQL C API.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.xdobry.de/mysqltcl/&quot;&gt;MySQLtcl&lt;/a&gt; - a simple API for accessing a MySQL database server from the Tcl programming language.&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://mysql-cocoa.sourceforge.net/&quot;&gt;MySQL-Cocoa&lt;/a&gt; - An Objective-C Cocoa API for MySQL (based on libmysql).&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://efsa.sourceforge.net/archive/ravits/mysql.htm&quot;&gt;Eiffel MySQL&lt;/a&gt; - an interface to the MySQL database server using the Eiffel programming language.&lt;/li&gt;
    &lt;li&gt;Bryan O&#039;Sullivan&#039;s &lt;a href=&quot;http://www.serpentine.com/software/mysql&quot;&gt;pure Haskell MySQL bindings&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hsql-mysql-1.7&quot;&gt;hsql-mysql&lt;/a&gt; - A MySQL driver for &lt;a href=&quot;http://haskell.org/&quot;&gt;Haskell&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.steinmole.de/d/&quot;&gt;MySQL Driver&lt;/a&gt; for the programming language &lt;a href=&quot;http://www.digitalmars.com/d/&quot;&gt;D&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://kayalang.org/library/latest/MyDB&quot;&gt;MyDB&lt;/a&gt; module for the &lt;a href=&quot;http://kayalang.org/&quot;&gt;Kaya&lt;/a&gt; programming language (included in the distribution)&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://raevnos.pennmush.org/code/ocaml-mysql/&quot;&gt;MySQL bindings&lt;/a&gt; for the &lt;a href=&quot;http://caml.inria.fr/ocaml/index.en.html&quot;&gt;Objective Caml&lt;/a&gt; language&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://gnade.sourceforge.net/&quot;&gt;MySQL bindings&lt;/a&gt; for &lt;a href=&quot;http://www.gnu.org/software/gnat/&quot;&gt;GNU Ada&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;The &lt;a href=&quot;http://www.clifford.at/spl/&quot;&gt;SPL programming language&lt;/a&gt; ships with a &lt;a href=&quot;http://www.clifford.at/spl/spldoc/sql_mysql.html&quot;&gt;MySQL module&lt;/a&gt; included in the distribution&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://octave.sourceforge.net/database/index.html&quot;&gt;Database bindings&lt;/a&gt; (incl. MySQL) for &lt;a href=&quot;http://www.gnu.org/software/octave/&quot;&gt;GNU Octave&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.keplerproject.org/luasql/&quot;&gt;LuaSQL&lt;/a&gt; is a simple database interface for the &lt;a href=&quot;http://lua.org/&quot;&gt;Lua&lt;/a&gt; programming language&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://code.google.com/p/erlang-mysql-driver/&quot;&gt;erlang-mysql-driver&lt;/a&gt; - a revamped MySQL driver for &lt;a href=&quot;http://www.erlang.org/&quot;&gt;Erlang&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://www-pu.informatik.uni-tuebingen.de/users/knauel/myscsh/&quot;&gt;Myscsh&lt;/a&gt; - a Scheme implementation of the MySQL protocol&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I probably forgot some other drivers/bindings - if you have any more to add, please let me know!&lt;/p&gt;
&lt;p&gt;And if you&#039;d like to create your own implementation for your favourite language: the protocol is documented &lt;a href=&quot;http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://www.redferni.uklinux.net/mysql/MySQL-Protocol.html&quot;&gt;here&lt;/a&gt;. &lt;a href=&quot;http://jan.kneschke.de/projects/mysql/mysql-protocol&quot;&gt;Jan&#039;s additional notes&lt;/a&gt; may also be helpful to get you started.&lt;/p&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 09:41:29 -0700</pubDate>
        </item>
            
        <item>
            <title>Using protobuf for designing and implementing replication in Drizzle</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Using+protobuf+for+designing+and+implementing+replication+in+Drizzle/ccwdu</link>
            <description>So, following the lead of &lt;a href=&quot;http://krow.livejournal.com/604544.html&quot;&gt;Brian&lt;/a&gt;, I spent a few hours of the weekend to create a very simple replication scheme for &lt;a href=&quot;http://launchpad.net/drizzle&quot;&gt;Drizzle&lt;/a&gt; using &lt;a href=&quot;http://code.google.com/p/protobuf/&quot;&gt;protobuf&lt;/a&gt; for specifying
the binary log events.&lt;p&gt;

Since we are developing a replication for a cloud, there are a few
things we have to consider:

&lt;ul&gt;

  &lt;li&gt;&lt;strong&gt;Servers are unreliable.&lt;/strong&gt; We shall not trust
  server, but we shall expect them to crash at the worst possible time
  (&lt;a href=&quot;http://en.wikipedia.org/wiki/Murphy%27s_law&quot;&gt;Murphy&lt;/a&gt; is
  a very good friend of mine, you know. He must be, since he visits me
  very often.) This means that we need to have support to allow
  statements to be sent to the slaves before the transaction is
  complete, which means that we need to support
  &lt;em&gt;interleaving&lt;/em&gt; and hence both &lt;em&gt;commit&lt;/em&gt; and
  &lt;em&gt;rollback&lt;/em&gt; events.&lt;p&gt;

  In order to handle interleaving, we need to have a &lt;em&gt;transaction
  id&lt;/em&gt;, but in order to handle session specific data in the event
  of a crash (for example, temporary tables), we need to have a
  &lt;em&gt;session id&lt;/em&gt; as well. However, the session id is only needed
  for statements, not for other events, so we add it there. This will
  allow the slave to expire any session objects when necessary.&lt;p&gt;

  Since we cannot always know if the transaction is complete when a
  statement has been executed, we need to have the commit and rollback
  events as separate events, instead of using the alternative approach
  of adding flags to each query event.&lt;/li&gt;
  
  &lt;li&gt;&lt;strong&gt;Reconnections are frequent.&lt;/strong&gt; Since masters go up
  and down all the time, we have to do what we can to make
  reconnections to another master easy. Among other things, it means
  that we cannot interrogate the master of a slave after it has
  crashed to figure out where we should start replication, so we need
  some form of &lt;a href=&quot;http://jan.kneschke.de/projects/mysql/mysql-proxy-and-a-global-transaction-id&quot;&gt;&lt;em&gt;Global
  Transaction ID&lt;/em&gt;&lt;/a&gt; to be able to decide where to start
  replication when connecting to another master.&lt;p&gt;

  In our case, we want the transaction id to be transferable to other
  servers as well, so we combine the server id and the transaction id
  to form the Global Transaction ID for this replication.&lt;p&gt;

  Since reconnections are frequent, we also need to have techniques
  for resolving conflicts between events, and using a
  &lt;em&gt;timestamp&lt;/em&gt; is such a one. To handle that, we add a timestamp
  to each event, and we make room for a &lt;em&gt;nano-precision
  timestamp&lt;/em&gt; immediately, meaning that we need at least 64 bits
  for that.&lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Network is not reliable.&lt;/strong&gt; We expect the cloud to
  be spread all over the planet, so we cannot really trust the network
  to provide a reliable transport. This means that we need some form
  of &lt;em&gt;checksum&lt;/em&gt; on each event to ensure that it was transferred
  correctly.&lt;/li&gt;
&lt;/ul&gt;

Now, for the first simple implementation, we&#039;re aiming at a
statement-based replication, which means that there has to be a way to
transfer session context information. Remember that statement based
replication just sends statements that change the existing state of
the database, but which is also dependent on the context for the
session. For example, the &lt;code&gt;INSERT&lt;/code&gt; statement below cannot
be reliably replicated without the value of the user variable
&lt;code&gt;@foo&lt;/code&gt;.

&lt;pre class=&quot;code&quot;&gt;
SET @foo = &#039;Hello world!&#039;;
INSERT INTO whatever VALUES (@foo);
&lt;/pre&gt;

This is already handled in MySQL Replication by preceeding each query
log events with a sequence of &lt;em&gt;context events&lt;/em&gt;, but for this
solution there is another approach that is more appropriate: adding a
set of name-value pairs to the query event.

Another problem is that there are functions that are
non-deterministic, or context dependent in other ways, but these can
be handled by rewriting the queries as follows:&lt;p&gt;

&lt;table border=&quot;1&quot;&gt;
  &lt;tr&gt;Instead of...use this&lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign=&quot;top&quot;&gt;INSERT INTO info VALUES (UUID(), 47);&lt;/td&gt;
    &lt;td valign=&quot;top&quot;&gt;SET @tmp = UUID();&lt;br&gt;INSERT INTO info VALUES (@tmp, 47);&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;p&gt;

Now, the protobuf specification for all the above items, including
some events used to control the storage of the binary log, is:

&lt;pre&gt;
package BinaryLog;

message Header {
  required fixed64 timestamp = 1;
  required uint32 server_id = 2;
  required uint32 trans_id = 3;
}

message Start {
  required Header header = 1;
  required uint32 server_version = 2;
  required string server_signature = 3;
}

message Chain {
  required Header header = 1;
  required uint32 next = 2;            // Sequence number of next file
}

message Query {
  message Variable {
    required string name = 1;
    required string value = 2;
  }

  required Header header = 1;
  repeated Variable variable = 2;
  required uint32 session_id = 3;
  required string query = 4;
}

message Commit {
  required Header header = 1;
}

message Rollback {
  required Header header = 1;
}
&lt;/pre&gt;

After tossing together a reader and a writer for the format, the
result is:

&lt;pre class=&quot;code&quot;&gt;
$ &lt;strong&gt;./binlog_writer --trans 1 \
&amp;gt; --set nick=mkindahl --set name=&#039;Mats Kindahl&#039; \
&amp;gt; &#039;INSERT INTO whatever VALUES (@nick,@name)&#039;&lt;/strong&gt;
$ &lt;strong&gt;./binlog_writer --trans 1 \
&amp;gt; --set nick=krow --set name=&#039;Brian Aker&#039; \
&amp;gt; &#039;INSERT INTO whatever VALUES (@nick,@name)&#039;&lt;/strong&gt;
$ &lt;strong&gt;./binlog_writer --trans 1 \
&amp;gt; --set nick=mtaylor --set name=&#039;Monty Taylor&#039; \
&amp;gt; &#039;INSERT INTO whatever VALUES (@nick,@name)&#039;&lt;/strong&gt;
$ &lt;strong&gt;./binlog_reader&lt;/strong&gt;
# Global Id: (1,0)
# Timestamp: 484270929829911
set @name = &#039;Mats Kindahl&#039;
set @nick = &#039;mkindahl&#039;
INSERT INTO whatever VALUES (@nick,@name)
# Global Id: (1,0)
# Timestamp: 484330886264299
set @name = &#039;Brian Aker&#039;
set @nick = &#039;krow&#039;
INSERT INTO whatever VALUES (@nick,@name)
# Global Id: (1,0)
# Timestamp: 484391458447787
set @name = &#039;Monty Taylor&#039;
set @nick = &#039;mtaylor&#039;
INSERT INTO whatever VALUES (@nick,@name)
$ &lt;strong&gt;ls -l log.bin&lt;/strong&gt;
-rw-r--r-- 1 mats bazaar 311 2008-08-19 14:22 log.bin
&lt;/pre&gt;

Protobuf Rocks!

You find the branch containing the ongoing development of this at &lt;a href=&quot;&quot;&gt;Launchpad&lt;/a&gt;. Right now, there is no changes to the server,
we want the format to be stable first, so the branch is merged on a
regular basis to the main tree as well.

&lt;ul&gt;
  &lt;li&gt;Branch: &lt;a href=&quot;http://code.launchpad.net/~mkindahl/drizzle/replication-simple&quot;&gt;&lt;code&gt;lp:~mkindahl/drizzle/replication-simple&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Blueprint: &lt;a href=&quot;https://blueprints.launchpad.net/drizzle/+spec/replication-simple&quot;&gt;&lt;code&gt;drizzle/replication-simple&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 07:11:03 -0700</pubDate>
        </item>
            
        <item>
            <title>Sybase sues database start-up in east Texas court favored by &#039;patent pirates&#039;</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Sybase+sues+database+start-up+in+east+Texas+court+favored+by+%27patent+pirates%27/ccv28</link>
            <description>In a lawsuit filed quietly in a federal court in Texas that is seen as a favorable venue for patent suits, Sybase is charging start-up Vertica Systems with infringement.
&lt;p&gt;&lt;a href=&quot;http://feeds.computerworld.com/~a/Computerworld/Business/Intelligence/News?a=55ksHR&quot;&gt;&lt;img src=&quot;http://feeds.computerworld.com/~a/Computerworld/Business/Intelligence/News?i=55ksHR&quot; border=&quot;0&quot;&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://feeds.computerworld.com/~r/Computerworld/Business/Intelligence/News/~4/368709571&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 05:50:42 -0700</pubDate>
        </item>
            
        <item>
            <title>Worse than DDOS</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Worse+than+DDOS/ccvsp</link>
            <description>&lt;p&gt;Today I worked on rather interesting customer problem.  Site was subject what was considered DDOS and solution was implemented to protect from it.   However in addition to banning the intruders IPs it banned IPs of web services which were very actively used by the application which caused even worse problems by consuming all apache slots which were allocated to the problem.  Here are couple of interesting lessons one can learn from it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Implement proper error control&lt;/strong&gt;  In reality it took some time to find what was the issue because there was no error reporting for situation of unavailable web services.  If log would be flooded with messages about web services being unavailable it would be much easier to find.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;User Curl&lt;/strong&gt;  PHP Has a lot of functions which can accept URL as parameter and just fetch the data transparently for you. They however do not give you good error control and timeout management compared to curl module.  Use that when possible it is easy. You can implement your own class to fetch required URL with single call while having all needed timeout handling and reporting to match your application needs.   If you&amp;#8217;re using PHP functions make sure &lt;strong&gt;default_socket_timeout&lt;/strong&gt; has proper value or set it per session.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Set Curl Timeouts&lt;/strong&gt;  Set both &lt;strong&gt;TIMEOUT&lt;/strong&gt; and &lt;strong&gt;CONNECT_TIMEOUT&lt;/strong&gt; as these apply to different connection stages and just setting timeout is not enough.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beware of PHP sessions &amp;#8220;files&amp;#8221; handler &lt;/strong&gt;   I already &lt;a href=&quot;http://www.mysqlperformanceblog.com/2007/03/27/php-sessions-files-vs-database-based/&quot;&gt;wrote&lt;/a&gt; about this topic, but when troubleshooting this all takes another angle.   Default file handler means file gets locked  while PHP request is being served.   In this case because of network stall request could be taking 100+ seconds.  Users are inpatient and do not wait so long pressing reload multiple times&amp;#8230; which just adds to the list of users waiting on session file lock.   This not only makes apache slots consumed at much higher pace but makes it harder to find what exactly is causing the lock because most of offending processes you can find from apache &amp;#8220;server-status&amp;#8221; will be just waiting on file to be unlocked.    I used &amp;#8220;gdb&amp;#8221; to connect to the process showing high number of seconds since start finding where it is stuck.  If it is somewhere in curl module (or mysql - waiting on long query to come back) - this is our query if it is waiting on the session file lock we can get that file and  use &lt;strong&gt;fuser&lt;/strong&gt; to see what other processes are using that files - these would be either waiting on locks or owning the lock and so one of them is the process we&amp;#8217;re looking for.   Things are much easier with say memcached session storage -  this does not cause any locks for parallel session use so only the process which actually stalls waiting on external resource will show high number of seconds since request start. &lt;/p&gt;
    &lt;hr style=&quot;margin:0;height:1px&quot;/&gt;
    &lt;p&gt;Entry posted by peter |
      &lt;a href=&quot;http://www.mysqlperformanceblog.com/2008/08/18/worse-than-ddos/#comments&quot;&gt;3 comments&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;Add to: &lt;a href=&quot;http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2008/08/18/worse-than-ddos/&amp;amp;title=Worse than DDOS&quot; title=&quot;Bookmark this post on del.icio.us&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png&quot; alt=&quot;delicious&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://digg.com/submit?phase=2&amp;amp;url=http://www.mysqlperformanceblog.com/2008/08/18/worse-than-ddos/&amp;amp;title=Worse than DDOS&quot; title=&quot;Digg this post on Digg.com&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png&quot; alt=&quot;digg&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2008/08/18/worse-than-ddos/&amp;amp;title=Worse than DDOS&quot; title=&quot;Submit this post on reddit.com&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png&quot; alt=&quot;reddit&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2008/08/18/worse-than-ddos/&amp;amp;T=Worse than DDOS&quot; title=&quot;Vote for this article on Netscape&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif&quot; alt=&quot;netscape&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk=http://www.mysqlperformanceblog.com/2008/08/18/worse-than-ddos/&amp;amp;title=Worse than DDOS&quot; title=&quot;Add to Google Bookmarks&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png&quot; alt=&quot;Google Bookmarks&quot;/&gt;&lt;/a&gt;&lt;/p&gt;</description>
            
            <pubDate>Tue, 19 Aug 2008 03:21:50 -0700</pubDate>
        </item>
            
        <item>
            <title>PHP to Javascript | Hyperlink Navigation</title>
            <link>http://swik.net/MySQL/Planet+MySQL/PHP+to+Javascript+%7C+Hyperlink+Navigation/ccvso</link>
            <description>A</description>
            
            <pubDate>Tue, 19 Aug 2008 03:21:43 -0700</pubDate>
        </item>
            
        <item>
            <title>first pass at a domain driven architecture</title>
            <link>http://swik.net/MySQL/Planet+MySQL/first+pass+at+a+domain+driven+architecture/ccux6</link>
            <description>We&#039;ve completed the first pass of the new domain driven architecture, so I wanted to give you an update about how it works and tell you about some of the interesting things we found out along the way.&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;How It Works&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;The basic idea of the domain driven architecture is to separate your application&#039;s business logic from the underlying nuts and bolts, so that you can use several different applications interchangeably or migrate from one platform to another while preserving the essential core of your application.  Another related goal is for you to be able to write business logic code in business terms, so instead of working with tables in a database or their equivalents, you can work with business concepts such as customers, orders, and invoices.  Later, when someone else comes in to read your code, it will be easier for them to understand what you&#039;ve done and help maintain it going forward.&lt;br/&gt;&lt;br/&gt;To do this, we have implemented a set of entity class objects representing the data model of opentaps.  Most of these classes are automatically generated from the original entitymodel XML&#039;s, and you can extend or reuse them to implement more complex business logic.  The actual interactions with external resources such as databases or legacy services are defined as Java interfaces, and a central domains directory defines where they are implemented.  So, you can define an OrderRepositoryInterface of the methods for obtaining order related information, and your Order domain can interact with this interface.  The actual implementation of it is in the OrderRepository, and at run time opentaps will use Spring to look in the domains-directory.xml file to find the order domain that you are actually using and get the order repository from it.  If later you decide to switch from the opentaps order management system to another order management system, you can just re-implement all the Order domain interfaces, and the core order processing logic will continue to function.&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;What We Learned&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;A couple of the things that we realized as we work on defining the domain driven architecture:&lt;br/&gt;&lt;br/&gt;We decided it was necessary to implement a true object layer for the opentaps data model.  I originally thought that this was unnecessary, and we could just extend the old ofbiz GenericValue into our domain objects as needed.  This turned out not to work, though, because we&#039;d be stuck with chunky GenericValue objects instead of lightweight Java objects.   More importantly, it would have introduced logical inconsistencies.  For example, imagine if you implemented a method called getTotal(), and later somebody introduced a field called &quot;total&quot; to an entity.  If you were extending GenericValues to Java objects, get(&quot;total&quot;) and getTotal() would give you different results. &lt;br/&gt;&lt;br/&gt;My original plan also called for an Infrastructure class which provided the &quot;plumbing&quot; for each platform.  Thus, for the ofbiz-based applications there would be the delegator and dispatcher, and for a hibernate-based application there will be a session factory, etc. etc.  This actually made the code very messy, because we could not define a common Infrastructure interface which could be used across domains.  Each domain with have to use an Infrastructure which is specific to its framework.  After further thought, though, I realized that what we really needed was a common Infrastructure that was global to all the frameworks used in opentaps.  This did not compromise the reusability of any particular domain implementation, and has a nice benefit of being able to transfer resources from one platform to another. &lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The Next Step&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Now that we have the structure in place, we will be reimplementing some of the existing features with the new domain driven architecture and in the process refine it further.  The initial emphasis will be on parts of the application that could really use an object-oriented redesign, either to improve code manageability, like the Party and contact information features, which could benefit from inheritance, or performance, by rewriting some old minilang XML code in Java.</description>
            
            <pubDate>Mon, 18 Aug 2008 18:56:33 -0700</pubDate>
        </item>
            
        <item>
            <title>GSoC Weekly Report - Week 10-12</title>
            <link>http://swik.net/MySQL/Planet+MySQL/GSoC+Weekly+Report+-+Week+10-12/ccuk0</link>
            <description>&lt;span style=&quot;font-weight:bold;&quot;&gt;Project: MySQL Forge RSS/Atom feeds&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Note: I was on vacation for the last 2 weeks (10+11) and didn&#039;t have internet access, so this report is a little later than it should be.&lt;br/&gt;&lt;br/&gt;KEY ACCOMPLISHMENTS LAST WEEKS&lt;br/&gt;&lt;br/&gt;* Installing SeleniumRC.&lt;br/&gt;* Writing basic SeleniumRC test script for the Forge.&lt;br/&gt;* Writing PHPUnit tests for all HiPPo classes.&lt;br/&gt;&lt;br/&gt;KEY TASKS THAT STALLED LAST WEEK&lt;br/&gt;&lt;br/&gt;* None&lt;br/&gt;&lt;br/&gt;KEY CONCERNS&lt;br/&gt;* None&lt;br/&gt;&lt;br/&gt;TASKS IN THE UPCOMING WEEK&lt;br/&gt;&lt;br/&gt;* Prepare for extending the SeleniumRC test script to cover a larger part of the Forge.&lt;br/&gt;* Submitting the Final Student Survey.&lt;br/&gt;&lt;br/&gt;I would like to thank Google, MySQL and specially my mentor Jay for the opportunity to collaborate in the open source community and let me contribute something which will be useful in the future to many other open source hackers I hope.</description>
            
            <pubDate>Mon, 18 Aug 2008 15:15:58 -0700</pubDate>
        </item>
            
        <item>
            <title>Running with Alexander Stubb</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Running+with+Alexander+Stubb/ccuej</link>
            <description>&lt;p&gt;On Saturday, I spent a couple of hours running with &lt;strong&gt;&lt;a href=&quot;http://www.alexstubb.com/&quot;&gt;Alexander Stubb&lt;/a&gt;&lt;/strong&gt;. No, Alex is not our newest recruit to the &lt;strong&gt;MySQL Support Team&lt;/strong&gt;, he&amp;#8217;s the &lt;strong&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Alexander_Stubb&quot;&gt;Foreign Minister of Finland&lt;/a&gt;&lt;/strong&gt; (the guy in the yellow T-shirt below).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.alexstubb.com/imagebank/med4468.jpg&quot; alt=&quot;Alex Stubb tying his shoelaces&quot; height=&quot;320&quot; width=&quot;214&quot;/&gt;&lt;/p&gt;
&lt;p&gt;But let me rewind to the beginning. I have been increasing my running to &lt;a href=&quot;http://blogs.mysql.com/kaj/2008/01/05/1259-km/&quot;&gt;over 1200 km a year&lt;/a&gt;, and when I heard that the &lt;strong&gt;Münchner Stadtlauf&lt;/strong&gt; half-marathon doesn&amp;#8217;t crash with Finnish midsummer (something never to be missed), I registered for it and &lt;a href=&quot;http://blogs.mysql.com/kaj/2008/06/29/14605-new-half-marathon-pr-at-munchner-stadtlauf/&quot;&gt;finished it in 1:45:58&lt;/a&gt;. And I calculated I would have a chance at going below four hours at a full marathon, so I registered for the &lt;strong&gt;&lt;a href=&quot;http://www.helsinkicitymarathon.fi/fi/tulokset.html&quot;&gt;Helsinki City Marathon&lt;/a&gt;&lt;/strong&gt;, which took place last Saturday on 16.8.2008 in my native Finland.&lt;/p&gt;
&lt;p&gt;At a restaurant close to the Olympic Stadium just before start, I met with my long-time MySQL colleagues &lt;em&gt;Patrik Backman&lt;/em&gt; and &lt;em&gt;Giuseppe Maxia&lt;/em&gt;, as well as our fresh Sun colleague &lt;em&gt;Peter Eisentraut&lt;/em&gt;, of PostgreSQL fame. When the time for the start (fairly late, three o&amp;#8217;clock in the afternoon) approached, I went for the start area, and was pleasantly surprised to hear the race moderator interview our Foreign Minister.&lt;/p&gt;
&lt;p&gt;To continue my pleasant surprise, Alex said he was not only going to be the starter of the marathon, but he was going to run himself. The interview was started in Finnish, and then went on to Swedish. &amp;#8220;&lt;em&gt;What&amp;#8217;s your target time?&lt;/em&gt;&amp;#8221; the interviewer asked. &amp;#8220;&lt;em&gt;Oh, I have one, but I haven&amp;#8217;t published it&lt;/em&gt;&amp;#8221; &amp;#8212; he evidently had the same marathon goal communication policy as I.  The interviewer swapped away from our two domestic languages to foreign ones, going over English and German to French. And Alex continued smoothly and fluently in his colloquial, youthful jargon in all of the &lt;strong&gt;five languages&lt;/strong&gt;. He had a targeted and clearly unscripted message in all languages. In German, for instance, Alex shared how &lt;strong&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Frank-Walter_Steinmeier&quot;&gt;Frank-Walter Steinmeier&lt;/a&gt;&lt;/strong&gt; (Germany&amp;#8217;s Foreign Minister) the day before had found him to be slighly mad for going for a marathon, right after a week full of intense &lt;strong&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Georgia_(country)&quot;&gt;Georgia&lt;/a&gt;&lt;/strong&gt; related negotiations.&lt;/p&gt;
&lt;p&gt;The interview formed a very good pep talk for us runners, and an opportunity for me to no longer have to be ashamed of the linguistic disabilities of our Foreign Minister (as &lt;a href=&quot;http://en.wikipedia.org/wiki/Ahti_Karjalainen&quot;&gt;used to be the case&lt;/a&gt; when I grew up, leading to a &lt;a href=&quot;http://en.wikipedia.org/wiki/Tankero&quot;&gt;whole genre of jokes&lt;/a&gt;). I share Alex&amp;#8217;s view that one can &lt;strong&gt;&lt;a href=&quot;http://blogs.mysql.com/kaj/2008/06/19/the-why-and-how-to-of-localising-presentations-beyond-english/&quot;&gt;show respect&lt;/a&gt;&lt;/strong&gt; by speaking the language of the audience (and Helsinki City Marathon has a very international audience).&lt;/p&gt;
&lt;p&gt;So off we went, and the start went well. The weather conditions were perfect: &lt;strong&gt;&lt;a href=&quot;https://launchpad.net/drizzle&quot;&gt;Drizzle&lt;/a&gt;&lt;/strong&gt;. And 16-18 degrees. Not too cold, not too hot. A few km after the start, I saw Patrik, Giuseppe and Peter amongst the spectators, and they took some pictures of me.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://kaj.arno.fi/Running_Kaj_by_Giuseppe.jpg&quot; width=&quot;400&quot;/&gt;&lt;br/&gt;
&lt;img src=&quot;http://kaj.arno.fi/Kaj_HCM08_Patrik_small.jpg&quot; width=&quot;400&quot;/&gt;&lt;/p&gt;
&lt;p&gt;The race passed by the Parliament Building, went out through familiar parts of Helsinki (Mejlans, Tölö, Munksnäs) to Esbo close to where MySQL&amp;#8217;s first Finnish offices were, and continued via the Nokia House to the absolute centre of Helsinki. That was the most enjoyable part of the running experience. I kept to my pace, and I felt like being on a train. I just went with the flow and didn&amp;#8217;t feel any effort. But after a while, my left knee started to remind me of its existence. Past the 21,1 km half way mark, it evened out as my right knee also begged for some attention. But basically, everything went fine until a while beyond 30 km, when the energy reserves of my body were depleted.&lt;/p&gt;
&lt;p&gt;&amp;#8220;So why didn&amp;#8217;t I drink more of the Gatorade offered?&amp;#8221;, the running reader will ask. Well, I had prepared a perfect excuse for the scenario in which I would have to stop: When in &lt;strong&gt;India&lt;/strong&gt; for the &lt;a href=&quot;http://blogs.sun.com/thava/entry/mysql_camp_29th_july_2008&quot;&gt;MySQL Camp in Bangalore&lt;/a&gt;, I had caught &lt;strong&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Salmonellosis&quot;&gt;salmonellosis&lt;/a&gt;&lt;/strong&gt;. Salmonella bacteria are not a nice companion if you run, but also not total inhibitors for running. That said, I chose not to upset my stomach any further by consuming potent, unfamiliar drinks. And the effect was that I dropped from 1606th position at 30 km to 1970th position in the goal (out of 5436 participants).&lt;/p&gt;
&lt;p&gt;So this meant that the last few km weren&amp;#8217;t all that enjoyable. But I still didn&amp;#8217;t get cramps like the 55 year old male athlete who was &lt;strong&gt;screaming &amp;#8220;aijaijai&amp;#8221; less than a km from the goal&lt;/strong&gt;, at as many decibels as his lung capacity allowed. Humbling.&lt;br/&gt;
&lt;img src=&quot;http://kaj.arno.fi/IMG_1301_Goal_small.jpg&quot; width=&quot;400&quot;/&gt;&lt;/p&gt;
&lt;p&gt;I &lt;strong&gt;&lt;a href=&quot;http://www.marathon.fi/ilmo2/show_profile.php?position=1970&amp;amp;runnernro=5728&amp;amp;serie=%20Miehet%2045v&amp;amp;hcmyear=2008&amp;amp;hcmid=1&quot;&gt;finished at 3:55:22&lt;/a&gt;&lt;/strong&gt;. That&amp;#8217;s my best marathon ever, about &lt;strong&gt;45 min faster than my previous personal record&lt;/strong&gt;. I didn&amp;#8217;t feel well in the goal, rolling back a few of my latest drinking transactions just after crossing the finish line (honest, it was just water).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://kaj.arno.fi/HCM_Kaj_Track.png&quot; height=&quot;328&quot; width=&quot;772&quot;/&gt;&lt;/p&gt;
&lt;p&gt;After the run, I went for something very typically Finnish: &lt;strong&gt;A sauna&lt;/strong&gt;. And there can hardly be a better timing for a nice, warm bath than right after getting into the goal of a cool (at least temperature-wise) marathon run. My body is often out of balance in many ways after a marathon, including but not limited to shivering out of cold. Ah, was it nice to relax and do some joint bragging together with fellow runners in the Olympic Swimming Stadium. And after the sauna, there were still plenty of runners coming to the goal area. &lt;strong&gt;I felt zero superiority over them&lt;/strong&gt;, as I still vividly remember my own first marathon with a time of 5:41. A marathon for an amateur must strictly be about competing against yourself. &lt;strong&gt;And if you (like me) start lousy enough, you&amp;#8217;ve got an easy target to beat.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;And, what happened with Alex Stubb?&lt;/p&gt;
&lt;p&gt;Well, he had shared with us that he had finished a previous Helsinki marathon in 3:59 and a Brussels marathon a bit below 3:40. I suspect he might have targeted 3:30, and like me, he lost positions towards the end of the race. At any rate, he finished 688th with a fabulous time of &lt;a href=&quot;http://www.marathon.fi/ilmo2/show_profile.php?position=688&amp;amp;runnernro=4486&amp;amp;serie=%20Miehet%2040v&amp;amp;hcmyear=2008&amp;amp;hcmid=1&quot;&gt;3:31:25&lt;/a&gt;. Extremely impressive for anyone, especially for a Foreign Minister!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.alexstubb.com/images/alex2007/7632.jpg&quot; alt=&quot;Alex Stubb running&quot; height=&quot;228&quot; width=&quot;180&quot;/&gt;&lt;/p&gt;
&lt;p&gt;(Yes, Alex did wear something slightly more appropriate than a suit for the marathon).&lt;/p&gt;</description>
            
            <pubDate>Mon, 18 Aug 2008 14:15:07 -0700</pubDate>
        </item>
            
        <item>
            <title>mysqlbinlog Tips and Tricks</title>
            <link>http://swik.net/MySQL/Planet+MySQL/mysqlbinlog+Tips+and+Tricks/ccuei</link>
            <description>&lt;p&gt;So, you have a binlog. You want to find out something specific that happened inside of it.  What to do?  &lt;code&gt;mysqlbinlog&lt;/code&gt; has some neat features, which I thought we would look at here. &lt;/p&gt;
&lt;p&gt;I should first explain what &lt;code&gt;mysqlbinlog&lt;/code&gt; really is. It is a tool that lets you analyze and view the binlogs/relaylogs from mysql, which are stored in binary format. This tool converts them to plaintext, so that they&amp;#8217;re human-readable.&lt;/p&gt;
&lt;p&gt;For the first tip, let&amp;#8217;s start with the &lt;code&gt;--read-from-remote-server&lt;/code&gt; option, which allows you to examine a binlog on a master server in order, perhaps, to  dump it onto your slave and compare master/slave logs for potential problems&lt;a href=&quot;http://www.pythian.com/blogs/1174/mysqlbinlog-tips-and-tricks#footnote&quot; name=&quot;footnote-source&quot;&gt;*&lt;/a&gt;.&lt;/p&gt;
&lt;pre style=&quot;overflow:auto;&quot;&gt;
$ mysqlbinlog --read-from-remote-server -uwesterlund -p mysql-bin.000001 -h 127.0.0.1 -P 3306 | head -5
Enter password:
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#080815 19:25:23 server id 101  end_log_pos 107 	Start: binlog v 4, server v 6.0.5-alpha-log created 080815 19:25:23 at startup
&lt;/pre&gt;
&lt;p&gt;Pretty useful!&lt;/p&gt;
&lt;p&gt;Now, let&amp;#8217;s assume we have a binlog that is 94 lines long&lt;a href=&quot;http://www.pythian.com/blogs/1174/mysqlbinlog-tips-and-tricks#footnote&quot; name=&quot;footnote-source&quot;&gt;*&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt; &lt;a href=&quot;http://www.pythian.com/blogs/1174/mysqlbinlog-tips-and-tricks#more-1174&quot; class=&quot;more-link&quot;&gt;(more&amp;#8230;)&lt;/a&gt;&lt;/p&gt;</description>
            
            <pubDate>Mon, 18 Aug 2008 14:15:06 -0700</pubDate>
        </item>
            
        <item>
            <title>Open Source is not making enough rich people richer</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Open+Source+is+not+making+enough+rich+people+richer/cct0l</link>
            <description>&lt;p&gt;I keep seeing this posts by some of the manager types on planet MySQL about how &lt;a href=&quot;http://blogs.the451group.com/opensource/2008/08/18/asking-the-right-questions-of-open-source/&quot;&gt;they or some other guy is worrying about open source vendors not raking in billions&lt;/a&gt; or are not stealing billions of money out of peoples pockets that should not be playing on the stock market and things along those lines. While I do agree that its great to see open source software flourish .. actually let me clear that up, why do I even care if open source software flourishes? I care because I think open source software enables a different kind of growth for society, one that is shared, one that lowers barriers, one that I feel is more in tune with a world at peace.&lt;/p&gt;

&lt;p&gt;Of course I want people that take part in this to be able to provide themselves and their families a decent life. But the fact of the matter is, these people do not need millions, the people that use this open source as an enabler do not need millions in marketing budgets either to realize the usefulness. Of course market capital can help in funding boring tasks like QA and documentation or full time developers etc. But the show will go on even without that.&lt;/p&gt;

&lt;p&gt;And guess what? Those &lt;a href=&quot;http://liip.ch&quot;&gt;small companies&lt;/a&gt; that make a buck with open source, they foster a culture where people go home happy at the end of the day instead of being bitter like most others. This is of course not something easily valued in monetary terms, but its nice that the pool of would be homocidal maniacs is reduced by these companies. At the same time even big guys are making plenty of money and giving back a bit here and there. New companies are popping up and slowly making it to big bucks too. So whats the point of this blog post? Lets get over this obsession with these companies that are supposed to make a few people insanly rich by selling their life (aka modern slaves) to VCs that are owned by people that haven&#039;t figured out yet to do better things in their lifes but to stack their millions higher and higher.&lt;/p&gt;

&lt;p&gt;Reminds me about the irritation I see these aquisition rumors: Of course it matters to people who their are getting gobbled up by and so its not trivial that a Microsoft goes knocking at the doors of Yahoo (not that Yahoo is a small shop or entirely dependent on open source, but from the outside it seems none the less sufficiently open sourcy for a fair share of the tech staff). Do they really believe that key people will stick around after they are required to use their new &amp;quot;@microsoft.com&amp;quot; email address?  Especially since these key people have plenty of options. Then again I guess these guys know their risk-analysis 101 and they are mostly after buying users.&lt;/p&gt;

&lt;p&gt;While I am trying to save the world, I might also want to mention that its time we kick the system a serious jolt. I like standards, but the out dated processes by &lt;a href=&quot;http://homembit.com/2008/08/openxml-end-of-story-appeals-rejected.html&quot;&gt;ISO and the likes are making a mockery if the idea&lt;/a&gt;. Seems like a little less corruption in such public services is too much to ask. Anyways, lets end this post not well formed &amp;lt;/rant&amp;gt;&lt;/p&gt;</description>
            
            <pubDate>Mon, 18 Aug 2008 12:14:55 -0700</pubDate>
        </item>
            
        <item>
            <title>Must we always escape values?</title>
            <link>http://swik.net/MySQL/Planet+MySQL/Must+we+always+escape+values%3F/cct0k</link>
            <description>One of the cardinal rules of writing web applications is to escape user-generated input with functions like PHP&amp;#8217;s real_escape_string.  This is a great rule, but one that can have a negative impact on your application&amp;#8217;s performance if used unnecessarily.  For instance, when querying data with an integer parameter that is passed internally (not [...]</description>
            
            <pubDate>Mon, 18 Aug 2008 12:14:55 -0700</pubDate>
        </item>
            
        <item>
            <title>BusinessWeek on Open Source at Red Hat</title>
            <link>http://swik.net/MySQL/Planet+MySQL/BusinessWeek+on+Open+Source+at+Red+Hat/cctn7</link>
            <description>Whitehurst is focused on growing Red Hat&#039;s top line; will open source purists cheer him on? &lt;a href=&quot;http://weblog.infoworld.com/openresource/archives/2008/08/businessweek_on.html?source=rss&quot;&gt; READ MORE&lt;/a&gt; &lt;/p&gt;</description>
            
            <pubDate>Mon, 18 Aug 2008 10:16:51 -0700</pubDate>
        </item>
            
        <item>
            <title>The ultimate tool for generating optimal my.cnf files for MySQL</title>
            <link>http://swik.net/MySQL/Planet+MySQL/The+ultimate+tool+for+generating+optimal+my.cnf+files+for+MySQL/ccthi</link>
            <description>&lt;p&gt;There are quite a few &amp;#8220;tuning primers&amp;#8221; and &amp;#8220;my.cnf generators&amp;#8221; and &amp;#8220;sample my.cnf files&amp;#8221; online.  The ultimate tool for generating an optimal my.cnf is not a tool.  It&amp;#8217;s a human with many years of experience, deep knowledge of MySQL and the full application stack, and familiarity with your application and your data.&lt;/p&gt;
&lt;p&gt;I don&amp;#8217;t know exactly the percentage, but quite a few of the servers I take a look at have been &amp;#8220;optimized&amp;#8221; with some tuning primer or question-and-answer script that spits out &amp;#8220;optimal&amp;#8221; parameters for my.cnf.&lt;/p&gt;
&lt;p&gt;Most of the time these servers are far from optimal.  Sometimes the my.cnf parameters are extremely wrong, to the point of causing a severe performance penalty.&lt;/p&gt;
&lt;p&gt;If it were as easy as writing a tool to do this, don&amp;#8217;t you think Maatkit would have mk-optimal-mycnf already?  In my opinion &amp;#8212; as someone who knows very well the complexity of creating a good my.cnf &amp;#8212; it&amp;#8217;s practically impossible.  Much harder than syncing data, or manipulating a replication hierarchy, or any of the other things Maatkit can do already.  And I doubt I&amp;#8217;ll ever even feel motivated to try creating such a tool.&lt;/p&gt;
&lt;p&gt;Don&amp;#8217;t bother with scripts.  Don&amp;#8217;t waste your time with most of the advice you see on the web in forums &amp;#8212; much of it is fundamentally wrong, even when it seems to come from an informed source.  Don&amp;#8217;t put too much faith in the my.cnf samples that come with your operating system; many of them have very bad advice in the comments, such as instructing you on how to set up replication in ways that guarantee breakage.&lt;/p&gt;
&lt;p&gt;If you want solid advice, ask someone who knows what they&amp;#8217;re doing (and can prove it).  Or buy our book.&lt;/p&gt;
&lt;p&gt;But even more fundamentally, you should not focus so much on my.cnf.  It is not the be-all and end-all of performance.  Tuning your server settings has far less impact on performance than tuning your schema, indexing, queries and &amp;#8212; you guessed it &amp;#8212; thinking deeply about your application architecture.  Server settings are a distraction and a waste of time for most people.&lt;/p&gt;
&lt;p&gt;Most my.cnf files I see only need minor tweaks, which give only so-so performance improvements.  Tuning my.cnf only helps a lot when my.cnf has extremely bad parameters.  The kind you&amp;#8217;ll get from tuning primers and automated my.cnf optimization scripts.&lt;/p&gt;
    &lt;hr style=&quot;margin:0;height:1px&quot;/&gt;
    &lt;p&gt;Entry posted by Baron Schwartz |
      &lt;a href=&quot;http://www.mysqlperformanceblog.com/2008/08/18/the-ultimate-tool-for-generating-optimal-mycnf-files-for-mysql/#comments&quot;&gt;13 comments&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;Add to: &lt;a href=&quot;http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2008/08/18/the-ultimate-tool-for-generating-optimal-mycnf-files-for-mysql/&amp;amp;title=The ultimate tool for generating optimal my.cnf files for MySQL&quot; title=&quot;Bookmark this post on del.icio.us&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png&quot; alt=&quot;delicious&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://digg.com/submit?phase=2&amp;amp;url=http://www.mysqlperformanceblog.com/2008/08/18/the-ultimate-tool-for-generating-optimal-mycnf-files-for-mysql/&amp;amp;title=The ultimate tool for generating optimal my.cnf files for MySQL&quot; title=&quot;Digg this post on Digg.com&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png&quot; alt=&quot;digg&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2008/08/18/the-ultimate-tool-for-generating-optimal-mycnf-files-for-mysql/&amp;amp;title=The ultimate tool for generating optimal my.cnf files for MySQL&quot; title=&quot;Submit this post on reddit.com&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png&quot; alt=&quot;reddit&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2008/08/18/the-ultimate-tool-for-generating-optimal-mycnf-files-for-mysql/&amp;amp;T=The ultimate tool for generating optimal my.cnf files for MySQL&quot; title=&quot;Vote for this article on Netscape&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif&quot; alt=&quot;netscape&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://www.google.com/bookmarks/mark?op=add&amp;amp;bkmk=http://www.mysqlperformanceblog.com/2008/08/18/the-ultimate-tool-for-generating-optimal-mycnf-files-for-mysql/&amp;amp;title=The ultimate tool for generating optimal my.cnf files for MySQL&quot; title=&quot;Add to Google Bookmarks&quot;&gt;&lt;img src=&quot;http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png&quot; alt=&quot;Google Bookmarks&quot;/&gt;&lt;/a&gt;&lt;/p&gt;</description>
            
            <pubDate>Mon, 18 Aug 2008 09:16:03 -0700</pubDate>
        </item>
            
    </channel>
</rss>
