Percona Server on the Nexus 7: Your own MySQL Database Server on an Android Tablet

Percona Server on the Nexus 7: Your own MySQL Database Server on an Android Tablet

Percona Server on the Nexus 7: Your own MySQL Database Server on an Android Tablet

Following Roel’s post, Percona Server on the Raspberry Pi: Your own MySQL Database Server , I thought what other crazy gadget can I run Percona Server on? And having an Asus Nexus 7 Android tablet I decided to give it a try.

Anything below contains a risk that you break your tablet if you do not know what you are doing, so be advised.

First, we need rooted tablet, most likely with custom ROM. I personally use SmoothROM which already comes with root and a proper kernel.

Next, we install Linux environment, I used Linux Deploy App to deploy Ubuntu 12.04 LTS. It does not remove current ROM and works pretty must as a regular Android App. The process is easy, but time consuming. It took about 30 mins to download and install all needed packages. When installation is done and Linux started we are able to SSH to the tablet and get familiar Linux shell.

From now it looks totally like a regular Linux installation, with a difference that this is an ARMv7 architecture, so we won’t be able to download regular 32 or 64bit binaries built for Intel architecture. And we do not have ARM binaries of Percona Server, so we will need to build from sources.

So we install build environment

download Percona Server MySQL source code

unpack and build. Not, not so simple, unfortunately there is a bug Non-portable code in client plugin (fails on ARM) which will not allow to build from plain sources.
We need to apply a small patch to source, which is available here.

After that to build binaries:

and if everything goes as expect we will have binaries in /usr/local/mysql, which we start

And a quick useless CPU benchmark just to understand some level of performance of tablet CPUs:

to compare with Cisco UCS server:

The next steps is to combine two tablets and run Percona XtraDB Cluster for MySQL but there is another bug Can’t build galera on ARM architecture which should be fixed before.

Now I have a hard time thinking about a practical application of running a MySQL database on a tablet, but it was more to check capabilities of mobile gadgets, which are quite impressive I may say.

Share this post

Comments (11)

  • Daniël van Eeden

    Hi Vadim,

    The link “Can’t build galera on ARM architecture” is broken.

    February 28, 2013 at 1:58 pm
  • Vadim Tkachenko


    Fixed, thanks.

    February 28, 2013 at 2:20 pm
  • Raju

    Vadim, When are you posting the benchmark results for MySQL on Nexus 7 🙂

    February 28, 2013 at 7:09 pm
  • Edmar

    Thank you! Wonderful post!

    Can you comment on how long it took to compile MySQL server on the Nexus 7?

    February 28, 2013 at 8:56 pm
  • Vadim Tkachenko


    It was another 30 mins or so.

    February 28, 2013 at 8:59 pm
  • Derek Downey

    I’m with Raju, I want to see benchmarks, Vadim!

    March 1, 2013 at 10:21 am
  • Vadim Tkachenko

    You are kidding, what kind of benchmarks do you want to see?

    March 1, 2013 at 10:59 am
  • Raju Nalli

    I am seriously kidding 🙂

    March 1, 2013 at 11:18 am
  • Derek Downey

    I am looking for a cage match style comparison between your PerconaServer on nexus 7 and Roel’s Raspberry Pi server. Apples to oranges, obviously. (PS. read: yes, kidding)

    March 1, 2013 at 11:24 am
  • hafizan

    If can compiled as embeded mysql in android tablet + php .. It sure will have lot of application will be make..
    Many developer thinking if can be done or not…

    March 4, 2013 at 2:43 am
  • Vadim Tkachenko


    interesting, but what problems embedded mysql will solve that sqlite can’t ?

    March 4, 2013 at 10:50 am

Comments are closed.

Use Percona's Technical Forum to ask any follow-up questions on this blog topic.