Files
mariadb-ubuntu/README.md

83 lines
1.9 KiB
Markdown
Raw Normal View History

2025-12-19 14:52:14 +01:00
# 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 wont stop you from running the script without reading the documentation like theres 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 <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](https://wiki.x-files.dk)
---
### License
Licensed under the [MIT License](./LICENSE).
---