Databases
MySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.
Reset a Forgotten MySQL Root Password on Linux
Recover access to MySQL or MariaDB on a Linux VPS by starting the server with skip-grant-tables, setting a new root password and restarting normally.
- Intermediate
- Linux VPS
- 5 min read
MySQL Point-in-Time Recovery Using Binary Logs
Recover a MySQL or MariaDB database to an exact moment after a bad write or dropped table by restoring a full backup and replaying binary logs up to the incident.
- Advanced
- Linux VPS
- 7 min read
How to create a database and user for a web app in MySQL or MariaDB
Set up a utf8mb4 database and a dedicated user with a strong password for WordPress, Laravel or any web app, then test the login before you configure the app.
- Beginner
- Linux VPS
- 4 min read
Where is my.cnf? MySQL and MariaDB config files explained
Find the MySQL or MariaDB config files on Ubuntu, Debian, AlmaLinux and Rocky Linux, learn the order they load in, and confirm which settings are really active.
- Beginner
- Linux VPS
- 5 min read
Restore MariaDB from a mariabackup Backup
Restore MariaDB from a mariabackup backup on a Linux VPS: stop the server, prepare the backup files, copy them back into the data directory, fix ownership and start MariaDB again.
- Intermediate
- Linux VPS
- 6 min read
Fix PostgreSQL "Too Many Clients Already" Errors
Diagnose and fix the PostgreSQL FATAL: sorry, too many clients already error by finding idle backends, tuning max_connections and adding a connection pooler.
- Intermediate
- Linux VPS
- 3 min read
Tune Redis maxmemory and Eviction Policies on a Linux VPS
Set a Redis memory ceiling, pick the right eviction policy and understand how key expiry behaves so your cache stops growing until the server runs out of RAM.
- Intermediate
- Linux VPS
- 7 min read
Tune MySQL and MariaDB memory settings for a small VPS
Set innodb_buffer_pool_size, max_connections and other my.cnf values so MySQL or MariaDB fits the RAM on your Linux VPS and stops swapping.
- Intermediate
- Linux VPS
- 6 min read
Find Slow PostgreSQL Queries with pg_stat_statements
Enable the pg_stat_statements extension on PostgreSQL and use it to find the queries consuming the most time on your server.
- Intermediate
- Linux VPS
- 6 min read
Back up and restore PostgreSQL with pg_dump and pg_restore
Back up a PostgreSQL database with pg_dump, save roles with pg_dumpall, and restore with psql or pg_restore, including parallel jobs for large databases.
- Beginner
- Linux VPS
- 5 min read
Enable MySQL TLS and Require Encrypted Connections
Enable TLS on MySQL or MariaDB, point the server at its certificate files, and force every client to connect over an encrypted channel.
- Intermediate
- Linux VPS
- 6 min read
Set Up PostgreSQL Streaming Replication on a Linux VPS
Configure a PostgreSQL primary with a replication role and slot, clone it with pg_basebackup, and bring up a standby that streams WAL in real time.
- Advanced
- Linux VPS
- 5 min read
MySQL vs MariaDB: which to use on your VPS
Compare MySQL and MariaDB on compatibility, licensing, features, release support and app support, so you can choose the right database for your VPS.
- Beginner
- Linux VPS
- 5 min read
How to create a MySQL user and grant privileges
Create MySQL and MariaDB user accounts, understand the host part, grant only the rights each app needs, and review, revoke or drop access safely.
- Beginner
- Linux VPS
- 5 min read
Fix MySQL Too Many Connections Errors
Diagnose MySQL error 1040, find which clients are holding connections open, raise max_connections safely and tune wait_timeout to stop the leak coming back.
- Intermediate
- Linux VPS
- 7 min read
How to install MariaDB on AlmaLinux and Rocky Linux
Install MariaDB on AlmaLinux or Rocky Linux 8 and 9 from AppStream or the official MariaDB repository, secure it, enable the service and handle SELinux.
- Beginner
- Linux VPS
- 5 min read
Back Up and Restore Redis Data on a Linux VPS
Take a safe Redis backup with BGSAVE or redis-cli --rdb, copy the RDB or AOF files off the server, and restore them without losing a key.
- Beginner
- Linux VPS
- 6 min read
How to install MySQL 8.4 on Ubuntu and Debian
Install MySQL on Ubuntu or Debian from the distribution packages or the official MySQL APT repository, secure it and make your first connection.
- Beginner
- Linux VPS
- 4 min read
Find High-Cost MySQL Queries with Performance Schema
Use MySQL Performance Schema to find the statements and wait events that consume the most time on your server, then confirm the fix with fresh measurements.
- Advanced
- Linux VPS
- 7 min read
Configure PostgreSQL Remote Access with pg_hba.conf
Allow PostgreSQL remote access by setting listen_addresses, adding pg_hba.conf rules and opening the firewall, then verify the connection from a client.
- Intermediate
- Linux VPS
- 6 min read
Fix MySQL Socket Error: Can't Connect to Local Server
ERROR 2002 means the MySQL client could not reach the server over its Unix socket. Check the service, find the real socket path, and fix the client config.
- Beginner
- Linux VPS
- 6 min read
Fix MySQL Charset and Collation Mismatches
Find where a MySQL charset or collation mismatch lives — server, database, table, column or connection — and fix it without corrupting your data.
- Intermediate
- Linux VPS
- 7 min read
Set Up MySQL Primary-Replica Replication on a Linux VPS
GTID-based MySQL replication between two Linux VPS: set server-id and binary logging on the primary, take a consistent snapshot, then point the replica at it and verify.
- Advanced
- Linux VPS
- 3 min read
Set Up a MariaDB Galera Cluster on Multiple VPSs
Install MariaDB with the Galera provider on three Linux VPSs, configure wsrep, bootstrap the first node and confirm every node reports Synced.
- Advanced
- Linux VPS
- 6 min read
Back Up and Restore MongoDB with mongodump and mongorestore
Create logical MongoDB backups with mongodump, restore them with mongorestore, and verify the data on your Linux VPS. Covers archives, gzip, single collections and cron.
- Beginner
- Linux VPS
- 6 min read
Troubleshoot PostgreSQL Locks and Blocking Queries
Find the session holding a PostgreSQL lock, read pg_locks and pg_stat_activity, and cancel or terminate blocking queries without losing data.
- Advanced
- Linux VPS
- 5 min read
psql cheat sheet: essential PostgreSQL commands
The psql commands you need day to day, from connecting and listing databases, tables and roles to running SQL files and exporting query results to CSV.
- Beginner
- Linux VPS
- 5 min read
Troubleshoot MySQL Replication Lag and Broken Replicas
Measure MySQL replication lag, read SHOW REPLICA STATUS, clear SQL thread errors and resync a replica that has fallen too far behind to catch up.
- Advanced
- Linux VPS
- 7 min read
Back Up MariaDB with mariabackup: Full and Incremental
Take a physical MariaDB backup with mariabackup, prepare it, add incrementals, and restore it safely on a Linux VPS.
- Intermediate
- Linux VPS
- 5 min read
Upgrade PostgreSQL with pg_upgrade: A Safe Major Version Upgrade
Move a PostgreSQL cluster to a new major version with pg_upgrade, including the compatibility check, the upgrade run and the post-upgrade analyze.
- Advanced
- Linux VPS
- 6 min read
Other topics
- Getting startedYour first hour with a new server: access, logins and basics.66 guides
- Linux VPSSSH, packages, services and everyday Linux administration.41 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.53 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.86 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.15 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.101 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.44 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.56 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.55 guides
- Billing & accountInvoices, renewals, the client area and your account.7 guides
- TroubleshootingWhen something is not working: checks and fixes.43 guides