MariaDB 10.11 LTS is a community-developed fork of MySQL with enhanced performance, more storage engines, and longer support windows. Ubuntu 24.04 LTS ships MariaDB 10.11 in its repositories. This guide installs and configures it.
Tested and valid on:
- Ubuntu 24.04 LTS
Prerequisites
- Ubuntu 24.04 LTS server
- A user with sudo privileges
Step 1 – Install MariaDB
Install from the Ubuntu 24.04 repos:
sudo apt update
sudo apt install mariadb-server -y
Step 2 – Start and Enable the Service
Start MariaDB and enable auto-start:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Step 3 – Run the Security Script
Secure the installation:
sudo mysql_secure_installation
Set a root password, remove anonymous users, disallow remote root login, and drop the test database.
Step 4 – Log In to MariaDB
Connect as root:
sudo mariadb
Or with password:
mariadb -u root -p
Step 5 – Create a Database and User
Inside the MariaDB shell:
CREATE DATABASE appdb;
CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'SecurePass123!';
GRANT ALL PRIVILEGES ON appdb.* TO 'appuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 6 – Check the Version
Verify the installed version:
mariadb --version
Step 7 – Manage the Service
Common management commands:
sudo systemctl stop mariadb
sudo systemctl restart mariadb
sudo systemctl status mariadb
Conclusion
MariaDB 10.11 LTS is now installed on Ubuntu 24.04 LTS. It is a drop-in replacement for MySQL and compatible with most applications that use the MySQL protocol.