Install MariaDB from Source Code on Ubuntu

System Information:

Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Get the source code

# Created a directory for my Project
mkdir mariaDB
cd mariaD…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Arunesh Choudhary

System Information:

Distributor ID:     Ubuntu
Description:        Ubuntu 22.04.1 LTS
Release:            22.04
Codename:           jammy

Get the source code

# Created a directory for my Project
mkdir mariaDB
cd mariaDB

mariaDB $ git clone git@github.com:arun-esh/mariaDBServer.git
mariaDB $ mv myDBServer server

Build the Server

sudo apt-get install build-essential libncurses5-dev gnutls-dev bison zlib1g-dev ccache libssl-dev

# Get cmake
# Downloaded under ~/
wget https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2.tar.gz

cd cmake-3.25.2
~/cmake-3.25.2 $ ./bootstrap
~/cmake-3.25.2 $  make
~/cmake-3.25.2 $  sudo make install

Configure the build

mariaDB $ mkdir build-mariadb-server-debug
mariaDB $ cd build-mariadb-server-debug

# configure mariaDB
build-mariadb-server-debug $ cmake ../server -DCMAKE_BUILD_TYPE=Debug

Compile

build-mariadb-server-debug $ cmake --build . --parallel 5

Starting MariaDB after build

# Create a directory 
mkdir data-dir

# create ~/mariadb.cnf
# The MariaDB server group

[mariadb]
datadir           = ~/mariaDB/data-dir
# path to source dir + sql/share
lc_messages_dir   = source/sql/share



# Now that you have created your own config file you can call it with flag `--defaults-file` while installing the system tables. To install the system tables call following from the build folder:
./scripts/mariadb-install-db --srcdir=../server --defaults-file=~/mariadb.cnf

# Run the DB Server
sql/mariadbd --defaults-file=~/mariadb.cnf

# Run client command line
client/mariadb


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Arunesh Choudhary


Print Share Comment Cite Upload Translate Updates
APA

Arunesh Choudhary | Sciencx (2023-02-13T22:29:07+00:00) Install MariaDB from Source Code on Ubuntu. Retrieved from https://www.scien.cx/2023/02/13/install-mariadb-from-source-code-on-ubuntu/

MLA
" » Install MariaDB from Source Code on Ubuntu." Arunesh Choudhary | Sciencx - Monday February 13, 2023, https://www.scien.cx/2023/02/13/install-mariadb-from-source-code-on-ubuntu/
HARVARD
Arunesh Choudhary | Sciencx Monday February 13, 2023 » Install MariaDB from Source Code on Ubuntu., viewed ,<https://www.scien.cx/2023/02/13/install-mariadb-from-source-code-on-ubuntu/>
VANCOUVER
Arunesh Choudhary | Sciencx - » Install MariaDB from Source Code on Ubuntu. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/02/13/install-mariadb-from-source-code-on-ubuntu/
CHICAGO
" » Install MariaDB from Source Code on Ubuntu." Arunesh Choudhary | Sciencx - Accessed . https://www.scien.cx/2023/02/13/install-mariadb-from-source-code-on-ubuntu/
IEEE
" » Install MariaDB from Source Code on Ubuntu." Arunesh Choudhary | Sciencx [Online]. Available: https://www.scien.cx/2023/02/13/install-mariadb-from-source-code-on-ubuntu/. [Accessed: ]
rf:citation
» Install MariaDB from Source Code on Ubuntu | Arunesh Choudhary | Sciencx | https://www.scien.cx/2023/02/13/install-mariadb-from-source-code-on-ubuntu/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.