77dbbfe4ee774174c7d32f90715a1eb5fde43c72
MariaDB for Ubuntu 24.04 Server
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 <adminuser> -p <password>
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 <adminuser> -p -e "SELECT VERSION();"
More Information
More guides and documentation can be found on wiki.x-files.dk
License
Licensed under the MIT License.
Languages
Shell
100%