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 install -y build-essential bison apt build-dep mariadb-server
Set Up git
Fetch and checkout the MariaDB source to a subdirectory of the current directory
git clone https://github.com/MariaDB/server.git mariadb cd mariadb git checkout 10.5
Build It
The following command builds a server the same way that is used for building releases. Use cmake . -DCMAKE_BUILD_TYPE=Debug
to build for debugging.
cmake . -DBUILD_CONFIG=mysql_release && make -j8
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 use 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
© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/get-build-and-test-latest-mariadb-the-lazy-way/