Install WebScaleSQL from source on Debian/Ubuntu

Install WebScaleSQL from source

In this post we will see together how to install and configure WebScaleSQL from source using as a base Debian or Ubuntu Linux distribution.

WebScaleSQL is a new fork of MySQL with the purpose of equipping it with the feature of scalability and speed required in case of important traffic. The development team behind WebScaleSQL is formed by engineers of Facebook, Google, LinkedIn and Twitter, and the version currently used as a base is MySQL 5.6.

At the moment there is no WebScaleSQL binary package in the repository, so it is necessary to install it from source: Let’s see what is the correct procedure for your installation.

Installing prerequisites

To compile WebScaleSQL are required the same dependencies of MySQL 5.6 which this fork is based.

The packages to be installed are:

sudo apt-get install cmake
sudo apt-get install gcc
sudo apt-get install libaio-dev
sudo apt-get install libncurses5-dev
sudo apt-get install libreadline-dev
sudo apt-get install bison
sudo apt-get install git
sudo apt-get install perl

Clone WebScaleSQL from GitHub

WebScaleSQL code is released in OpenSource mode and is hosted on GitHub: therefore we will use git to clone the repository as a whole and, therefore, have the ability to maintain continuously updated our installation.

To clone WebScaleSQL, navigate to the directory where will store the source and run the following command:

cd /usr/local/src
git clone 


You must create a user that will be run WebScaleSQL:

groupadd mysql
useradd -r -g mysql mysql


Now it is time to proceed with the compilation; navigate to the directory created by git and run:

cmake .

If at this stage it returns an error such as a missing library, you have to resolve the dependency and clean your CMakeCache.txt.

The next operation will last long, so once launched you can safely go to drink a cup of coffee:



Once the build process is done, let’s do the install. For the installation are needed administrator privileges:

sudo make install

Base configuration and test

Now that the whole process of installation is finished, you must perform the basic configuration. First of all we create the necessary files for WebScaleSQL:

cd /usr/local/mysql
sudo chown -R mysql .
sudo chgrp -R mysql .
sudo /usr/local/mysql/scripts/mysql_install_db –defaults-file=/usr/local/mysql/my.cnf --user=mysql

Now modify the file /usr/local/mysql/my.cnf adding the line:


Finally we add the service to system startup:

sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql.server

To test WebScaleSQL issue the command:

sudo /usr/local/mysql/bin/mysqld_safe

Leave a Reply

Your email address will not be published. Required fields are marked *

4 × four =