Deployment guide

MariaDB on a VPS: free, fast, controlled SQL

Deploy on a VPS Cloud →

Databases7 min read

MariaDB on a VPS: free, fast, controlled SQL

MariaDB remains a robust foundation for WordPress, Dolibarr, PrestaShop and many PHP applications. On a ServOrbit VPS, you keep control over accounts, volumes and backups instead of hiding the database behind an opaque offer. This guide sets up a clean Docker deployment and the first operational habits.

Why host MariaDB on a VPS?

MariaDB is a community fork of MySQL, 100% open source, renowned for its performance, reliability and full compatibility with existing MySQL applications. Hosted on a VPS, it frees you from the restrictions of shared hosting: no imposed connection limits, no arbitrary quotas on database size, and the ability to finely tune the InnoDB engine's parameters according to your real load. You keep control of your backups, your users and network security, without depending on a third-party provider for every maintenance operation.

What you can do with MariaDB on your VPS

  • Host several databases for different projects or clients on a single instance, with isolation per MariaDB user
  • Connect your Laravel, Symfony, WordPress or any other framework application through the standard port 3306, locally or from a remote server secured by a firewall
  • Run automated backups with mysqldump or Mariabackup and store them off-site according to your retention policy
  • Set up master-slave replication to ensure high availability or offload read-heavy workloads
  • Optimise performance by adjusting key variables such as innodb_buffer_pool_size, max_connections or query_cache_size directly in /etc/mysql/mariadb.conf.d/
  • Manage your databases through graphical interfaces such as phpMyAdmin, Adminer or DBeaver connected remotely via a secure SSH tunnel

Install MariaDB on your ServOrbit VPS

01

Order a ServOrbit Cloud VPS

Head to /vps-cloud and choose the plan suited to your load. For an everyday MariaDB instance (web applications, SME ERP), a VPS with 2 vCPU and 4 GB of RAM is a good starting point. Complete the order and note the SSH connection credentials sent by email.

02

Open the Marketplace in your client area

Log in to your ServOrbit client area, then navigate to the 'My VPS' section. Select your newly ordered VPS and click the 'Marketplace' tab to access the catalogue of applications available as 1-click installs.

03

Select MariaDB and launch the installation

In the Marketplace, search for 'MariaDB' and click the application's tile. Check the offered version (MariaDB 10.11 LTS or higher recommended), then click 'Install'. The system automatically provisions MariaDB on your VPS, configures the systemd service and generates a random root password that is provided to you at the end of the installation.

04

Secure the installation with mysql_secure_installation

Connect to your VPS over SSH (ssh root@your-ip) and run the mysql_secure_installation command. This interactive script guides you through setting or strengthening the root password, removing anonymous users, disabling remote root login and dropping the test database. These steps are essential before any production use.

05

Create your first database and your first application user

Connect to MariaDB with the command mysql -u root -p (default port: 3306). Then create your database and a dedicated user: CREATE DATABASE mon_app; CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'mot_de_passe_fort'; GRANT ALL PRIVILEGES ON mon_app.* TO 'appuser'@'localhost'; FLUSH PRIVILEGES;. Your application can now connect via host 127.0.0.1, port 3306, with these credentials.

Never expose port 3306 directly on the internet: configure your firewall to allow MariaDB connections only locally (127.0.0.1) or through an SSH tunnel. If a remote application needs to connect, use ssh -L 3306:127.0.0.1:3306 user@your-vps to create an encrypted tunnel, rather than opening the port publicly. Also enable the slow query log (slow_query_log = 1, long_query_time = 1) from the start to quickly identify queries to optimise before they affect your users.

The official documentation

For advanced configuration, tool-specific options and version changes, refer to the official MariaDB documentation. This guide covers going live on a ServOrbit VPS; the vendor documentation remains the reference for fine-tuning.

Deploy MariaDB in minutes on a ServOrbit Cloud VPS

Enjoy a high-performance VPS with 1-click MariaDB installation, full root access and support included — no commitment, from just a few dirhams a month.

Need help?

Browse our help center and FAQ, or write to our team — support in French, English and Arabic.