# MariaDB for Ubuntu 24.04 Server [![OS](https://img.shields.io/badge/ubuntu-24.04-E95420)](#) [![Shell](https://img.shields.io/badge/shell-bash-121011)](#) [![DB](https://img.shields.io/badge/server-mariadb-003545)](#) [![Auth](https://img.shields.io/badge/auth-socket-blue)](#) [![License](https://img.shields.io/badge/License-MIT-green)](./LICENSE) Install MariaDB on Ubuntu 24.04 server. This is not a demo and not a quick experiment. This is a production-ready installer with consistent security and repeatability. ## Why this installer exists The default MariaDB setup is easy — securing it properly is where most installations fail. ## What this installer does ✔ Enables root socket authentication ✔ Blocks remote login by default ✔ Creates admin account automatically ✔ Mirrors mysql_secure_installation hardening ✔ Supports optional password mode ✔ Safe to re-run without data loss ## What this installer does *NOT* do It won’t stop you from running the script without reading the documentation like there’s no tomorrow. Skip the README, and whatever happens next is your headache, not a bug report. ## 1. Prepare the system ``` sudo apt update -y ``` ## 2. Download the installer ``` git clone https://git.x-files.dk/database/mariadb-ubuntu.git ``` ``` cd mariadb-ubuntu ``` ## 3. Run the installer ``` sudo ./mariadbinstall -u -p ``` Example: ``` sudo ./mariadbinstall -u mydbuser -p "StrongPassword123" ``` > **IMPORTANT** > Wrap the password in quotes if it contains special symbols. ## Switch to password authentication (optional) ``` sudo mariadb ALTER USER 'root'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere'; FLUSH PRIVILEGES; ``` ## Verification ``` mariadb -u -p -e "SELECT VERSION();" ``` ### More Information More guides and documentation can be found on [wiki.x-files.dk](https://wiki.x-files.dk) --- ### License Licensed under the [MIT License](./LICENSE). ---