MariaDB is a community-developed, drop-in replacement for MySQL with additional storage engines and performance improvements. MariaDB 11 is the latest major release with enhanced features. This guide installs and secures MariaDB 11 on Ubuntu 26.04 LTS.
Tested and valid on:
- Ubuntu 26.04 LTS
Prerequisites
- Ubuntu 26.04 LTS server
- A user with sudo privileges
Step 1 – Install MariaDB
sudo apt update
sudo apt install mariadb-server mariadb-client -y
Step 2 – Check Status
sudo systemctl status mariadb
mariadb --version
Step 3 – Run the Security Script
sudo mysql_secure_installation
Set a root password and answer Yes to all security questions.
Step 4 – Log In
sudo mariadb
SHOW DATABASES;
exit
Step 5 – Create a Database and User
sudo mariadb
CREATE DATABASE mydb;
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'SecurePass2026!';
GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'localhost';
FLUSH PRIVILEGES;
exit
Step 6 – Enable at Boot
sudo systemctl enable mariadb
Step 7 – Tune Performance (optional)
Edit MariaDB config for better performance on small servers:
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add under [mysqld]:
innodb_buffer_pool_size = 256M
query_cache_type = 1
query_cache_size = 64M
Conclusion
MariaDB 11 is now installed and secured on Ubuntu 26.04 LTS. It is fully compatible with MySQL client tools and connectors, making it a reliable drop-in replacement for most applications.