MariaDB Server is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source.
MariaDB Server is an open-source relational database management system (RDBMS) and a drop-in replacement for MySQL. MariaDB Server was created by developers of MySQL after concerns arose over the acquisition of MySQL by Oracle Corporation. MariaDB Server aims to maintain compatibility with MySQL.
MariaDB Server will remain Free and Open Source Software licensed under GPLv2, independent of any commercial entities.
To install MariaDB Server on Linux follow these general steps.
Update Package Lists
First, update the package lists to ensure you’re getting the latest versions of the software.
sudo apt update
Install MariaDB Server
sudo apt install mariadb-server
Verify MariaDB Server Installation
mariadb --version
Output:
mariadb Ver 15.1 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
Check if MariaDB is running.
sudo service mariadb status
Output:
● mariadb.service - MariaDB 10.6.16 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor prese>
Active: active (running) since Thu 2024-05-09 20:47:15 CEST; 7min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 21054 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /va>
Process: 21055 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_S>
Process: 21057 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] &&>
Process: 21098 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_>
Process: 21100 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0>
Main PID: 21086 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 10 (limit: 7065)
Memory: 60.8M
CPU: 149ms
CGroup: /system.slice/mariadb.service
└─21086 /usr/sbin/mariadbd
Run MariaDB
Start the MariaDB service
Open Terminal and run the following command:
sudo service mariadb start
Open the MariaDB command-line client
Open Terminal and run the following command:
sudo mariadb
Display a list of databases
show databases;
Exit the MariaDB Command-Line Client
exit
Show version
Open Terminal and run the following command:
mariadb --version
Manage MariaDB server
Check the status of the MariaDB service
service mariadb status
Start the MariaDB Service
sudo service mariadb start
Restart the MariaDB Service
sudo service mariadb restart
Stop the MariaDB Service
sudo service mariadb stop
These commands are useful for managing the MariaDB server service, such as starting, stopping, restarting, and checking its status.
Database management tools
MySQL Workbench, primarily designed for use with MySQL, is a graphical tool for MySQL database management. MySQL Workbench can also be used with MariaDB. DBeaver is a universal database tool supporting multiple database systems, including MySQL and MariaDB. On the other hand, phpMyAdmin is a web-based tool specifically tailored for managing MySQL and MariaDB databases through a web interface.
Each of these tools offers unique features and interfaces that appeal to different users based on their preferences, workflows, and specific requirements in database management and administration.