English
€EUR
Databases

MariaDB

Compatible with the Infrawire installer

MariaDB server installed and running on a Linux VPS, ready for local use

Minimum requirements
  • 1 GB RAM
Developer
MariaDB Foundation
Version
Latest stable
License
GPL v2
Systems
Debian 12, Debian 13, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 24.04

About MariaDB

MariaDB is an open source relational database server, forked from MySQL. It is compatible with the vast majority of applications written for MySQL (WordPress, Nextcloud, Laravel, Django, Matomo and many more) and is driven with standard SQL.

On delivery, the mariadb-server package is installed from your distribution's repositories (Debian 12, Debian 13, Ubuntu 20.04, 22.04 or 24.04). The mariadb service is enabled and started, so it comes back on its own after a reboot. The exact version depends on the distribution you choose.

By default, MariaDB listens only on 127.0.0.1:3306. Nothing is exposed to the Internet, which is a sound starting point for applications hosted on the same VPS. You connect as the local root user with sudo mariadb.

What you can do with MariaDB

  • Installed from official repositories

    The package comes from the distribution's repositories, so security updates arrive through apt like the rest of the system.

  • Service enabled at boot

    The mariadb service is started with systemctl enable --now. It is running as soon as the server is delivered and comes back after every VPS reboot.

  • Listening on localhost only

    Port 3306 is reachable only from the server itself (127.0.0.1). Your database is not visible from outside until you decide otherwise.

  • Command-line client

    The sudo mariadb command opens an SQL session as local root, with no password to look up, so you can create databases and users right away.

  • MySQL compatible

    Common MySQL connectors and tools work with MariaDB. Migrating an existing application usually takes few changes.

  • Transactional InnoDB engine

    ACID transactions, foreign keys and row-level locking for web applications, APIs or internal tools that write a lot of data.

Get started with MariaDB

From order to production in a few minutes.

  1. 1

    Order the VPS with MariaDB

    Choose a Linux VPS in Paris or Frankfurt, select Debian or Ubuntu, then tick MariaDB in the "Applications" tab of the order form.

  2. 2

    Connect to the delivered server

    Once the VPS is delivered, connect over SSH with the credentials you received, then open the MariaDB client as local root. The end-of-install message shows the same command.

    Bash
    ssh USER@SERVER_IP sudo mariadb
  3. 3

    Create a database and a user

    Avoid using root in your applications. Create a dedicated database and a user restricted to it, with a long, unique password.

    Bash
    sudo mariadb -e "CREATE DATABASE app_db CHARACTER SET utf8mb4; CREATE USER 'app_user'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD'; GRANT ALL PRIVILEGES ON app_db.* TO 'app_user'@'localhost'; FLUSH PRIVILEGES;"
  4. 4

    Secure it for production

    Run the hardening script (mysql_secure_installation on Ubuntu 20.04), keep port 3306 closed in the firewall and schedule regular backups. If you need remote access, go through an SSH tunnel.

    Bash
    sudo mariadb-secure-installation sudo mariadb-dump --all-databases > backup.sql

MariaDB use cases

  • Database for a website or CMS

    Install WordPress, Nextcloud or a Laravel application on the same VPS and point them at localhost. The database stays private, with no open port.

  • API and application backend

    Host the database of a Node.js, Python or PHP application, with its tables, indexes and transactions, on a server you fully control.

  • Development or test environment

    Replicate the production database to test a schema migration or a version upgrade before touching real data.

  • Business data storage

    Centralise reporting data, order tracking or internal tools in an SQL database, with regular exports using mariadb-dump.

MariaDB FAQ

No. According to the installation recipe, MariaDB listens only on 127.0.0.1:3306. Only applications on the server and your SSH session can reach it. For access from your workstation, use an SSH tunnel.

More about MariaDB

Keep it local or open access

If your application runs on the same VPS, change nothing: listening on 127.0.0.1 is the safest setting. To administer the database from your workstation (DBeaver, HeidiSQL, a command-line client), use an SSH tunnel rather than a public port:

ssh -L 3306:127.0.0.1:3306 USER@SERVER_IP

You then connect to 127.0.0.1:3306 on your own machine. If you really need to accept remote connections, change the server's bind-address setting, create users tied to a specific IP, and restrict port 3306 to that IP in the firewall.

Backups

A logical dump is enough for most small databases. On older versions (Ubuntu 20.04), the command is called mysqldump.

sudo mariadb-dump --single-transaction --all-databases | gzip > /root/backup-$(date +%F).sql.gz

Schedule it with cron, then copy the archive off the server. A backup that stays on the same disk does not protect you from a VPS failure. Test a restore regularly.

Tuning the configuration to your RAM

The default settings are conservative. On a VPS dedicated to the database, the most important parameter is innodb_buffer_pool_size, which sets how much data is kept in memory. A value of 50 to 70% of RAM is a common starting point. Then watch memory usage before going further. For more tutorials, see the /learn section.

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.