You've already forked mariadb-ubuntu
83 lines
1.9 KiB
Markdown
83 lines
1.9 KiB
Markdown
|
|
# MariaDB for Ubuntu 24.04 Server
|
|||
|
|
[](#)
|
|||
|
|
[](#)
|
|||
|
|
[](#)
|
|||
|
|
[](#)
|
|||
|
|
[](./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 <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).
|
|||
|
|
|
|||
|
|
---
|