Databases
MySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.
64 guides · page 1 of 4
Allow remote MySQL connections in cPanel (Remote Database Access)
Let a desktop tool or another server connect to your cPanel MySQL database by adding its IP in Remote Database Access, with the right host, port and security tips.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Create a MySQL database and user in cPanel
Create a MySQL database, a database user and the right privileges in cPanel with the Database Wizard or Manage My Databases, then connect your app with the correct details.
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.
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.
Edit, delete, optimise and repair database tables in phpMyAdmin (cPanel)
Open phpMyAdmin from cPanel to edit rows, empty or drop tables, and run Optimize, Check and Repair table to reclaim space and fix crashed tables safely.
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.
Find and shrink large MySQL databases in cPanel
See which databases and tables use the most space in cPanel, clean logs, sessions, revisions and transients safely, then optimise tables to reclaim disk space.
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.
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.
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.
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.
Other topics
- Getting startedYour first hour with a new server: access, logins and basics.69 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.37 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.49 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.40 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.37 guides
- DomainsRegistering, transferring and managing domains and nameservers.20 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.19 guides
- CloudLinuxCloudLinux setup and use: LVE limits, CloudLinux Manager, CageFS and PHP/Node.js selectors.31 guides
- LiteSpeedLiteSpeed Web Server, LSCache and the LiteSpeed Cache plugin: install, settings and tuning.30 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.23 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.23 guides
- WP SquaredcPanel's WordPress platform: sites, plugins, staging and backups.9 guides
- SitePadBuild and publish websites with the SitePad builder.9 guides
- SitejetDesign, edit and publish sites with the Sitejet builder.9 guides
- WHMResellerAlpha and master resellers with WHMReseller: install, setup and use.12 guides
- VirtFusionInstall, set up and manage VirtFusion: hypervisors, packages, servers and WHMCS integration.7 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.30 guides
- PleskWebsites, email, databases and settings in the Plesk panel.52 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.40 guides
- WHMCSBilling, automation, products and client management with WHMCS.51 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.106 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.115 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.34 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.52 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.64 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.68 guides
- Linux VPSSSH, packages, services and everyday Linux administration.70 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.58 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.58 guides
Still stuck?
Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.
