# 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) Automated Bash installer for **MariaDB on Ubuntu 24.04**, configured with: * **Socket authentication for root** (modern, secure, no passwords lying around) * A dedicated **admin user created during install** * Full **local-only access** to reduce attack surface * Automatic **hardening equivalent to mysql_secure_installation** This is not a tutorial. This is a **deployment tool for production environments** — opinionated, hardened, and designed to "just work". ## Why this installer exists Because installing MariaDB is easy — but installing it *properly* is how future you avoids ulcers. This script handles: ✔ Installation ✔ Service enablement ✔ Hardening & security ✔ Admin user creation ✔ Local-only access ✔ Optional password auth if needed ## 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). ---