Linux, Web Server & Database
Install MariaDB on VPS
Get MariaDB installed, secured and ready for your application on a fresh VPS.
The Problem
A default MariaDB install leaves the root account insecure and nothing configured for your specific application, the same gaps as a fresh MySQL install.
About this problem
MariaDB is a drop-in replacement for MySQL started by MySQL's original developers, and it's now the default database on several major Linux distributions — but like MySQL, a fresh install still needs the security hardening script run and an application-specific database and user created before it's genuinely ready.
This comes up most often on distros (like current Debian/Ubuntu LTS releases) where MariaDB is the default `mysql-server` package, surprising people who expected MySQL by name.
What's Included
- Installing MariaDB server and running the security hardening script
- Creating a dedicated database and user for your application with least-privilege access
- Tuning key settings against your VPS's available RAM
- Confirming your application connects successfully with the new credentials
What's NOT Included
- Migrating existing data from another server (see the database migration service)
- Setting up replication or Galera clustering
- Ongoing database administration after initial setup
How It Works
- Install the MariaDB server package and confirm the service is running.
- Run mariadb-secure-installation (or mysql_secure_installation, both work) to lock down default accounts.
- Create a dedicated database and a scoped user rather than using root for the application.
- Adjust key my.cnf/mariadb.conf.d settings for buffer pool size and max connections.
- Test a real connection from the application side using the new credentials.
In practice: you buy the service, send over whatever access or details the job needs, I investigate and do the work, and you confirm it's resolved before we call it done.
Frequently Asked Questions
- Is MariaDB the same as MySQL?
- They share the same original codebase and are largely compatible at the SQL level, but have diverged over time with some different features — for most standard applications they're interchangeable.
- Why does installing mysql-server give me MariaDB?
- On several current Linux distributions, the mysql-server package name now actually installs MariaDB as the default implementation — this is intentional by the distro maintainers, not an error.
- Can I migrate from MySQL to MariaDB without issues?
- In most cases yes, since the on-disk format and SQL dialect are very close, but it's worth checking for any MySQL-specific features your application relies on before switching.
- Does WordPress work with MariaDB?
- Yes, WordPress officially supports MariaDB and it's commonly used as the default database for WordPress hosting.
- How do I secure a fresh MariaDB installation?
- Running the included secure-installation script to remove test databases and anonymous accounts, then creating a dedicated least-privilege user for each application, same approach as MySQL.
- Why is my MariaDB connection refused?
- Usually either the service isn't running, it's bound only to localhost when a remote connection is needed, or a firewall rule is blocking the port — each is checked in turn.