Databases
MySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.
Restore a MySQL Database from a mysqldump File
Load a .sql or .sql.gz dump back into MySQL or MariaDB on your Linux VPS with the mysql command, including charset options and fixes for the usual import errors.
- Beginner
- Linux VPS
- 6 min read
PostgreSQL Point-in-Time Recovery with WAL Archiving
Set up WAL archiving and restore a PostgreSQL cluster to an exact second with point-in-time recovery, using pg_basebackup, archive_command and a recovery target.
- Advanced
- Linux VPS
- 6 min read
Secure MongoDB Remote Access with bindIp and Authentication
Configure bindIp, enable authorization and restrict port 27017 so MongoDB accepts remote connections from your app server only.
- Intermediate
- Linux VPS
- 6 min read
Tune PostgreSQL Autovacuum and VACUUM Settings
Autovacuum defaults are built for large servers, not small VPSs. This guide shows how to adjust thresholds, cost limits and per-table settings to control table bloat.
- Advanced
- Linux VPS
- 6 min read
Fix Redis MISCONF RDB Snapshot Saving Error
The Redis MISCONF error means a background RDB save failed, so Redis stopped accepting writes. This guide finds the cause and restores saving safely.
- Intermediate
- Linux VPS
- 6 min read
Configure Redis Remote Access with bind and protected-mode
Redis refuses remote connections by default. Set the bind address, keep protected-mode under control, and open port 6379 only to the client IP that needs it.
- Intermediate
- Linux VPS
- 6 min read
Fix PostgreSQL Password Authentication Failed for User
Diagnose and fix the PostgreSQL "password authentication failed for user" error by checking pg_hba.conf rules, resetting the role password and reloading the server.
- Beginner
- Linux VPS
- 6 min read
Fix MariaDB Authentication Plugin Errors After Upgrade
MariaDB upgrades often change how accounts authenticate, so logins that worked yesterday fail with plugin or access-denied errors. This guide shows how to check which plugin a user has and switch it safely.
- Intermediate
- Linux VPS
- 6 min read
Choose Redis Persistence: RDB vs AOF
Compare Redis RDB snapshots and AOF logging, then configure the mix that matches how much data you can afford to lose when Redis restarts.
- Intermediate
- Linux VPS
- 6 min read
Tune MySQL InnoDB Buffer Pool Size for a VPS
Measure your InnoDB buffer pool hit rate, choose a size that fits your VPS memory, and apply innodb_buffer_pool_size safely in my.cnf.
- Intermediate
- Linux VPS
- 6 min read
Install Redis and Secure It with a Password
Install Redis on Ubuntu, Debian, AlmaLinux or Rocky Linux, set a password with requirepass, and confirm the server rejects unauthenticated commands.
- Beginner
- Linux VPS
- 3 min read
Repair Corrupted MySQL InnoDB Tables on a Linux VPS
Confirm InnoDB corruption with CHECK TABLE, start MySQL with innodb_force_recovery to dump readable data, then rebuild the tables from that dump.
- Advanced
- Linux VPS
- 6 min read
MySQL command-line cheat sheet for server admins
The MySQL and MariaDB commands you use most on a VPS, from logging in and listing databases to finding slow queries, killing them and checking server status.
- Beginner
- Linux VPS
- 5 min read
Find slow queries in MySQL with the slow query log
Turn on the MySQL slow query log, read it with mysqldumpslow and pt-query-digest, then use EXPLAIN to fix the queries that slow your app down.
- Intermediate
- Linux VPS
- 6 min read
How to install and secure Redis on a Linux VPS
Install Redis on Ubuntu, Debian, AlmaLinux or Rocky Linux, keep it on localhost, require a password or ACL user, and run it under systemd.
- Beginner
- Linux VPS
- 5 min read
Analyze PostgreSQL Query Plans with EXPLAIN ANALYZE
Use EXPLAIN ANALYZE to see the plan PostgreSQL actually ran, read scan and join nodes, and fix slow queries caused by bad row estimates or missing indexes.
- Intermediate
- Linux VPS
- 6 min read
Install the latest PostgreSQL from the official PGDG repository
Add the PostgreSQL project's own apt or dnf repository to get a current major version on Ubuntu, Debian, AlmaLinux or Rocky Linux, and run more than one version side by side.
- Beginner
- Linux VPS
- 5 min read
Create MongoDB Users and Assign Roles
Create MongoDB users with db.createUser, give them built-in or custom roles scoped to one database, and confirm each login with mongosh.
- Beginner
- Linux VPS
- 5 min read
Reset the PostgreSQL postgres user password
Set or reset the password of the postgres superuser, and regain access when normal logins fail by trusting local connections for a moment and then reverting.
- Beginner
- Linux VPS
- 5 min read
Optimize MySQL Indexes with Composite and Covering Indexes
Learn how to design MySQL composite and covering indexes for WHERE, JOIN and ORDER BY queries, then verify the plan with EXPLAIN and EXPLAIN ANALYZE.
- Intermediate
- Linux VPS
- 6 min read
Import a Large MySQL SQL File Without Timeouts
Import a large MySQL dump from the command line without phpMyAdmin timeouts. Raise packet limits, split oversized files and verify the result.
- Intermediate
- Linux VPS
- 6 min read
How to install MongoDB on Ubuntu and secure it
Install MongoDB on Ubuntu from the official repository, enable authentication, create an admin user, and restrict access with bindIp and UFW.
- Intermediate
- Linux VPS
- 6 min read
How to back up and restore MySQL databases with mysqldump
Back up one or all MySQL and MariaDB databases with mysqldump, keep InnoDB dumps consistent, compress them with gzip, and restore them safely with the mysql client.
- Beginner
- Linux VPS
- 5 min read
Connect MySQL Workbench, HeidiSQL or DBeaver to your VPS over SSH
Manage the MySQL or MariaDB database on your VPS from a desktop client through an SSH tunnel, without opening port 3306 to the internet.
- Beginner
- Linux VPS
- 5 min read
How to check database and table sizes in MySQL and MariaDB
Find out how much space each MySQL or MariaDB database and table uses, spot the biggest tables, and compare the numbers with real disk use on your VPS.
- Beginner
- Linux VPS
- 5 min read
Create PostgreSQL users, roles and databases
Create a PostgreSQL login role and a database for your application, set a password, grant the right privileges on the database and schema, and manage ownership.
- Beginner
- Linux VPS
- 5 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