English

Install MariaDB on a Linux VPS

1 min
VPS/VDS Hosting

MariaDB is a MySQL-compatible engine ideal for WordPress, panels and web apps on your Infrawire Linux VPS.

📋 Prerequisites

  • Ubuntu 22.04+ or Debian 11+ Linux VPS with sudo
  • At least 1 GB RAM (2 GB recommended for production)
  • Open app ports in UFW if remote DB access is needed

Install MariaDB

Bash
sudo apt update sudo apt install -y mariadb-server sudo systemctl enable --now mariadb

Secure the install

Set root password, remove anonymous users, disable remote root, drop test DB if unused.

Bash
sudo mariadb-secure-installation

Create database and user

Bash
sudo mariadb -e "CREATE DATABASE myapp CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" sudo mariadb -e "CREATE USER 'myapp'@'localhost' IDENTIFIED BY 'StrongPassword!';" sudo mariadb -e "GRANT ALL PRIVILEGES ON myapp.* TO 'myapp'@'localhost';" sudo mariadb -e "FLUSH PRIVILEGES;"

Verify

Bash
sudo mariadb -u myapp -p myapp -e "SHOW TABLES;"

Happy deploying! 🚀

Stay up to date with the latest offers, discounts and special promotions.

View promotions

We use cookies

We use analytics cookies to improve your experience on our site. No data is sold to third parties. Learn more in our privacy policy.