Databases

MariaDB / MySQL Database Administration

Your database is the beating heart of your website or application, holding everything from crucial customer data to your core content. Because databases are so vital, managing them, especially when running upgrades, dropping tables, or troubleshooting errors, can feel like high-stakes surgery. Fortunately, you don’t have to navigate these critical tasks blindly.

Whether you are provisioning a brand-new server, writing your first mysqldump command, or fine-tuning InnoDB variables to handle massive traffic spikes, this collection of guides provides the technical foundation you need. We cover both user-friendly graphical interfaces like cPanel and powerful command-line (SSH) techniques to help you securely and efficiently manage your MySQL and MariaDB environments.

Explore the guides below to learn how to:

  • Manage Users and Access: Secure your data by safely creating and deleting specific database users, resetting root passwords, and connecting external development tools like VSCode SQLTools.
  • Backup and Restore: Protect your server against catastrophic data loss by mastering manual backups, mysqldump exports, and full database restorations.
  • Maintain and Upgrade: Keep your environment secure and stable by safely upgrading database versions across various operating systems (Ubuntu, CentOS), checking for errors, and repairing corrupted tables.
  • Tune for Performance: Speed up sluggish query times by understanding key MySQL variables, mastering database indexing, and batch-converting legacy storage engines.

MariaDB / MySQL Database Articles

31 results

This collection contains articles and resources for MariaDB / MySQL administration. The topics covered include initial setup, user management, replication, and performance tuning.

Adding MySQL Users to Databases
You can create MySQL users to help you organize your database management, giving each user access to specific databases and specific privileges.…
Backing Up a MySQL Database
Protect your website data before making major changes. Learn how to manually back up your MySQL databases using cPanel, the command line,…
Batch converting MySQL table engines
MySQL batch table engine conversion: MyISAM InnoDB. Get CLI scripts, rollback prep, & robust methods. *Always backup data first!*
Change a MySQL User Password
Changing MySQL passwords to something new and secure is easy via the command line.
Checking a MySQL Database for Errors and Repairing
To check and repair MySQL database errors in cPanel, navigate to the MySQL Databases section after logging in. From there, you can…
Checking Your MySQL Version
If you are using MySQL databases, you might need to occasionally check the version of MySQL that is installed on your server.…
Creating a MySQL User
Control MySQL database access by creating user-specific restrictions for databases, tables, and privileges. Use cPanel or the command line to create MySQL…
Deleting a MySQL Database
Deleting unused databases frees up space but the action is permanent! We strongly recommend backing up your database before you delete it,…
Deleting MySQL Users
If you are using MySQL databases with multiple users, you may need to control database access by deleting database users. You can…
How to connect to MySQL/MariaDB using SQLTools in VSCode
With SQLTools in VSCode, you can streamline your database workflow, making it a valuable tool for developers who interact with MySQL or…
Importing and exporting a MySQL database
Learn how to export and import MySQL databases for backups. This guide covers using the command line (`mysqldump`), phpMyAdmin, and WP-CLI.
Installing MySQL community edition on new AlmaLinux 8 servers
Install MySQL Community on new AlmaLinux 8. *NEW SERVERS ONLY* (data loss risk). Steps: prep, repo, install, secure.
MariaDB performance tuning tips at Nexcess
Optimize MariaDB performance with our tuning script and expert tips. Learn to use MySQLTuner and benchmarking to get a faster database today.
Moving the MySQL Data Directory
Move MySQL `datadir`: Step-by-step guide using `rsync`, symlinks, & `my.cnf` updates. Includes CloudLinux notes & critical backup advice.
MySQL Commands
MySQL command guide: Data dump/restore, password management, admin tasks (upgrades, root reset, slow log) & datadir/tmpdir setup.
Mysqldump
Use `mysqldump` to backup & restore MySQL/MariaDB. Learn to export DBs/tables, restore from SQL, & fix "trigger in wrong schema" errors.
Mysqldump stored procedures
MySQL Stored Procedures: Check for routines & ensure they're in `mysqldump` backups using `–routines`. cPanel's `/scripts/pkgacct` handles this.
MySQL Performance: Converting MySQL to MariaDB
Converting MySQL to MariaDB is beneficial for optimizing your website and database. In our tutorial, we cover how to upgrade your database…
MySQL Troubleshooting
MySQL troubleshooting guide: Resolve DB corruption, connection problems, full disks, remote access, & advanced errors.
Resetting Your MySQL Root Password
Reset MySQL root password if security compromised. Change passwords every 90 days for enhanced server security.
Restoring a MySQL Database from a Backup
Made a change and something went wrong? Restoring a MySQL database from a backup is the fastest way to get your site…
Selecting a MySQL Database via Command Line and cPanel
Have multiple MySQL databases? To avoid editing the wrong one, you must select it first. Here's how to do it using cPanel…
Show (List) MySQL Databases via Command Line on Linux
Find out how to easily show (list) all MySQL databases on Linux via command line with our comprehensive tutorial.
Understanding key MySQL variables
This guide explains key MySQL variables, their purpose, impact, and default values. It's a reference for understanding server behavior and optimization, with…
Understanding the InnoDB storage engine in MySQL
InnoDB: MySQL/MariaDB's default engine for performance & reliability. Guide: features, `SHOW ENGINES`, create/alter tables & fix issues.
Upgrading MySQL
Planning a MySQL upgrade? Review supported upgrade paths, understand MariaDB migrations, and find step-by-step guides for WHM, Ubuntu, CentOS, and Plesk.
Upgrading MySQL/MariaDB on core managed servers
Safely upgrade MySQL/MariaDB: Step-by-step guide for Core Managed servers. Includes pre-checks, backups (`rsync`, `mysqldump`), upgrade & follow-up.
Upgrading MySQL on CentOS
Safely upgrade MySQL on an unmanaged CentOS server. Learn how to handle backups, fix old password hashes, update binaries, and import tables…
Upgrading MySQL on Ubuntu
This tutorial is for the purpose of upgrading MySQL on an unmanaged server with an Ubuntu operating system. If you have CentOS…
Using MySQL Tools via Secure Shell (SSH)
Interacting with MySQL Client via command line allows manipulation of databases and their functions. This article covers common commands and their functionalities,…
What is MySQL Indexing?
What is MySQL indexing? Learn how it speeds up database queries by replacing slow linear searches with efficient binary sorting to improve…