Get, build and test latest MariaDB the lazy way
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 code (if you want)
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