MySQL 5.6 — InnoDB and Memcached

One of the more exciting new features in MySQL 5.6 is the InnoDB to Memcached interface. Basically memcached runs as a daemon plugin and can bypass the SQL optimizer and parser for NoSQL access.

The first step is to download the new MySQL 5.6 with the InnoDB-Memcache preview. Sorry, Linux only at this time. And install memcached.

Second, run the provided configuration script mysql> < scripts/innodb_memcached_config.sql. This will do a lot of the work to get things running out of the box and one of the links below details what is happening behind the scenes when you run the script. Third, load the plugin mysql> install plugin daemon_memcached soname “”;. Forth, to make sure we can see recently inserted data, you will need to set the transaction level mysql> set session TRANSACTION ISOLATION LEVEL read uncommitted;

Fifth step, feed some data into the provided InnoDB demo table mysql> INSERT INTO demo_test VALUES ('dave','it works', 10, 200, NULL).

Now, can we get memcached to get the data from InnoDB?

MySQl 5.6 Memached-InnoDB

Using memached to get the data from InnoDB

Yes! This is a very simple example using the ‘canned’ configuration. Your mileage may vary and this server is a preview and not for production. But there is a lot more stuff in there that I will be looking into soon.


9 Responses to MySQL 5.6 — InnoDB and Memcached

  1. […] post: MySQL 5.6 — InnoDB and Memcached var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var […]

  2. geekleague says:


    Good job on the article which is well written.
    This is a great blog!

    I definitely clicked the ‘Like’ button. 🙂

    Feel free to visit my blog too, over at

    Geek League

  3. Shlomi Noach says:

    Why is it required to use READ_UNCOMMITTED?
    If using READ_COMMITTED, will I not see any committed transaction’s result?

    • OpenSorceDBA says:

      I set it to READ_UNCOMMITTED to see what I hoped was a best case for speed could be. But I am not seeing any difference between READ_COMMITTED and READ_UNCOMMITTED; that is probably the fault of my testing procedures.

  4. smu says:

    It’s works with the actual versions ( also? From where do you get the I can’t find it also in the linux version. any idea?

  5. Shri Javadekar says:

    I am trying this on MySQL 5.6.16. Are you sure this procedure still holds true. I insert a new row in the test.demo_test table but I can’t get back the value when I fetch it from telnet.

    I verified using “show plugins” that the daemon_memcached plugin is enabled. Don’t see anything in the logs. Any ideas?

    • OpenSorceDBA says:

      Can you see it through memcached?

      • Shri Javadekar says:

        Actually, the problem was that there was another memcached instance running on the default port (11211). So when using telnet to connect to memcached, I wasn’t really connected to the memcached instance running with MySQL. Ideally, mysql should’ve complained about not being able to use that port and error out. But it doesn’t :(.

        Neways, I stopped the memcached instance and restarted mysql so that it could get access to that port. After that things worked fine.

        Thanks for following up!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: