Supporting continuity and open collaboration

Get the code, build it, test it

MariaDB Server is hosted on GitHub. The official repository can be found at

Get the source code

The recommended way to get the source is to clone it.

git clone

Build the server

Before you can build the server, you must install build dependencies. On a Debian based distribution:

apt-get build-dep mysql-server
apt-get install libgnutls28-dev # This may or may-not be already installed

Configure the build

MariaDB uses cmake to generate Makefiles used to compile the server. To configure a Debug build, useful for development, go to the base folder where you’ve cloned the MariaDB source tree and run:

cmake . -DCMAKE_BUILD_TYPE=Debug

CMake will now check to see which libraries are have available, which compiler is installed and if everything checks out, it will finish with a “Configure successful” message. If there are failures, check to see which libraries you need to install. You probably need to install the development versions of them.


 make -j5

Substitute 5 with the numbers of cores you have available for faster builds.

Testing the server

Now that the server is built, we should test that everything is working properly. MariaDB has a testing framework defined in mysql-test folder. To run all tests:

 cd mysql-test
./mtr --parallel=5 --mem

There are lots of useful flags for mtr.

  • --parallel=#number-of-parallel-tasks will run multiple tests in parallel, thus speeding up tests. The process can easily take over an hour, even if parallelisation is used.
  • --mem is used to force the tests to be run on a virtual ramdisk. This will speed things up as long as RAM is sufficient.

Platinum Sponsors

MariaDB Foundation Platinum sponsors

Gold Sponsors

MariaDB Foundation Gold sponsors

Code statistics