Get, build and test latest MariaDB the lazy way

You are viewing an old version of this article. View the current version here.

The intention of this documentation is show all the steps of getting, building and testing the latest MariaDB server (10.5 at time of writing) from github. Each stage links to the full documentation for that step if you need to find out more.

Install all tools needed to build MariaDB

OpenSuse

sudo zypper install git gcc gcc-c++ make bison ncurses ncurses-devel zlib-devel libevent-devel cmake openssl

Debian

apt-get -y build-essential bison build-dep mariadb-server 

Set up git

Fetch and checkout the MariaDB source to a subdirectory of the current directory

git clone [email protected]:MariaDB/server.git mariadb
cd mariadb
git checkout 10.5

Build it

The following command builds a server suitable for debugging or finding problems. There are other build scripts for other configurations.

./BUILD/compile-pentium64-debug

Check the server (if you want to)

cd mysql-test
mtr --parallel=8 --force

Install the default databases

./scripts/mariadb-install-db --srcdir=.

(Older MariaDB version is using mysql_install_db)

Install the server (If needed)

You can also run and test mariadb directly from the build directory, in which case you can skip the rest of the steps below.

make install

Start the server

Start the server in it's own terminal window for testing. Note that the directory depends on your system!

/usr/sbin/mysqld

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.