Skip to content
  • About
  • Contact
  • Docs
  • Features
  • Home

Configurations

5
  • Setup RAID Level 6
  • Setup RAID Level 5
  • How To Add Swap on RHEL or Centos based system
  • Website Migration to Non-Panel OpenLiteSpeed Server
  • Linux Server Performance Tuning

CyberPanel

9
  • Mounting /tmp on a Separate File
  • Updating CyberPanel Main VirtualHost Configuration
  • Updating CyberPanel vHosts Configuration
  • How to Change CLI PHP on CyberPanel
  • How to Update PHP Version to 8.1 in CyberPanel (From 7.3, 7.4, or 8.0)
  • CyberPanel Server Cleanup: Logs, Dumps, Backups
  • CyberPanel Full LSPHP Installation PHP 7.4 – 8.3
  • CyberPanel / OpenLiteSpeed: Clean LSPHP Session Files
  • SSL Certificate Management in CyberPanel via SSH

Hestia Control Panel

6
  • Fixing Email Bounce Back Issue in Hestia (Exim4 Blacklist Rejection)
  • Managing Fail2Ban in HestiaCP Server
  • Installing and Configuring PHP Versions in HestiaCP
  • phpMyAdmin Not Found in HestiaCP
  • Setting Up a Reverse Proxy for any Port in HestiaCP
  • How to Install Let’s Encrypt SSL in Hestia CP (Hostname, Admin Panel, and Email Server)

WHM/cPanel

6
  • Setting Up a Reverse Proxy on cPanel/WHM for Port 8081
  • How to increase the size of the cPanel-generated /tmp filesystem
  • Installing Old PHP Versions on a cPanel/WHM Server
  • Fixing “550: Your Country is Not Allowed to Connect to This Server” Error in Exim (cPanel)
  • Enable WP-CLI in CageFS on CloudLinux Servers (WHM/cPanel)
  • Securing /tmp and /var/tmp with a Dedicated Loopback Filesystem

Nagios

5
  • Service Checks
  • Uptime Checks
  • Disk Space Checks
  • Load Checks
  • Email Related Checks

WordPress

3
  • WordPress Core Reinstallation Guide
  • Managing WordPress Users via WP-CLI
  • Website Duplication, Migration, or Domain Change

Operating System

1
  • Server Reboot (RHEL or Centos based system)

AWS

1
  • How to Resize EBS Volumes on AWS

Databases

2
  • MySQL
    • Optimizing MySQL Performance
    • Recovering MySQL in Plesk When InnoDB Crashes

CloudLinux

4
  • Moving cagefs-skeleton directory
  • Enable WP-CLI in CageFS on CloudLinux Servers (WHM/cPanel)
  • Enable bc in CageFS on CloudLinux Servers(WHM/cPanel)
  • How to Upgrade MySQL 5.x to MySQL 8.0 on CloudLinux (WHM server) with MySQL Governor

Cloudflare

1
  • Configuring Security Headers in Cloudflare

ISPmanager

1
  • Install Free SSL (Let’s Encrypt) for domain.tld on ISPmanager with NGINX

Plesk

1
  • Plesk Admin Login Blocked – IP Restriction Recovery Guide

VPN

4
  • Install OpenVPN Open Source in Linux CentOS Ubuntu Debian Servers
  • Protected: OpenVPN Installation & Fix Wiki (CloudLinux / CentOS 7 & 8)
  • Outline VPN Installation & Management Guide
  • Installing AdGuard Home on Debian/Ubuntu (Docker)
View Categories
  • Home
  • Docs
  • CloudLinux
  • How to Upgrade MySQL 5.x to MySQL 8.0 on CloudLinux (WHM server) with MySQL Governor

How to Upgrade MySQL 5.x to MySQL 8.0 on CloudLinux (WHM server) with MySQL Governor

This guide walks you through safely upgrading MySQL 5.x to 8.0 using CloudLinux’s MySQL Governor

🔍 MySQL Version Options for Governor
/usr/share/lve/dbgovernor/mysqlgovernor.py --mysql-version=mysql80

MySQL Governor supports various MySQL versions. Here’s how to set the version:

| Version Value | MySQL Version |
|—————|—————-|
| `auto` | Default (depends on OS/cPanel) |
| `mysql51` | MySQL 5.1 |
| `mysql55` | MySQL 5.5 |
| `mysql56` | MySQL 5.6 |
| `mysql57` | MySQL 5.7 |
| `mysql80` | MySQL 8.0 (requires MySQL Governor 1.2-37+) |

✅ Step-by-Step Upgrade Process
 🔒 Create Backup Directory
mkdir -p /backup/mysql_upgrade/sql_exports

mkdir -p creates the directory and subdirectory at once.

This will store SQL dumps of your current databases for rollback if needed.

💾 Export All Databases

Navigates into the export folder.

cd /backup/mysql_upgrade/sql_exports

Export all databases

for i in $(mysql -e 'show databases;' |grep -v 'Database\|information_schema\|performance_schema'); do echo $i; mysqldump --single-transaction $i > $i.sql; done;

– mysql -e  show databases;’`: Lists all databases.
–  grep -v : Filters out system databases.
–  mysqldump –single-transaction : Safely exports each database to a `.sql` file.
–  > $i.sql : Saves each database to its own `.sql` file.

 

🛑Stop MySQL and Backup Configs

Stops MySQL service safely before upgrade.

whmapi1 --output=jsonpretty configureservice service='mysql' enabled=0

Does the following:

  • Tells cPanel/WHM to disable the MySQL service from being started or monitored by its internal systems (like chkservd).
  • It modifies WHM’s service manager settings so that:
  • MySQL does not start automatically on reboot.
  • WHM won’t attempt to restart it if it stops.
cp -prf /etc/my.cnf /backup/mysql_upgrade/

cp -prf: Copies the MySQL config file (my.cnf) with:
-p : Preserves timestamps.
-r : Recursively (if folder).
-f : Forces overwrite.

Copies the entire MySQL data directory for emergency restore if needed.

cp -prvf /var/lib/mysql /backup/mysql_upgrade/
🧱 List and Backup Installed MySQL RPMs
rpm -qa | grep -i mysql | grep 5.7

Lists all currently installed MySQL-related RPMs, specifically version 5.7.

mkdir -p /backup/mysql_upgrade/rpm_exports
cd /backup/mysql_upgrade/rpm_exports

Prepares directory to store rebuilt RPMs.

for i in $(rpm -qa | grep -i mysql | grep 5.7); do echo $i; rpmrebuild -n $i; done;

Rebuilds installed MySQL RPM packages using `rpmrebuild`.
-n: Build RPMs in non-interactive mode.

cp -prf /root/rpmbuild/RPMS/x86_64/* /backup/mysql_upgrade/rpm_exports/

Copies the newly rebuilt RPMs to your backup folder.
Useful if you ever need to revert.

⬆️  Upgrade to MySQL 8.0 via Governor

Sets MySQL Governor to use version 8.0.

/usr/share/lve/dbgovernor/mysqlgovernor.py --mysql-version=mysql80

Start  MySQL and installed

systemctl start mysql
/usr/share/lve/dbgovernor/mysqlgovernor.py --install

– Installs the new MySQL version and applies Governor’s integration.

🚀  Start MySQL and Upgrade System Tables
systemctl start mysql

Starts the upgraded MySQL service.

mysql_upgrade

Updates internal system tables and checks for any incompatibilities or issues post-upgrade.

🧠 Final Tips

– Double-check that all apps are compatible with MySQL 8.0.
– Consider testing this entire process in a staging environment.
– Keep your `/backup/mysql_upgrade` folder safe until you’re confident everything works.

 

Table of Contents
  • 🔍 MySQL Version Options for Governor
  • ✅ Step-by-Step Upgrade Process
    •  🔒 Create Backup Directory
    • 💾 Export All Databases
    • 🧱 List and Backup Installed MySQL RPMs
  • ⬆️  Upgrade to MySQL 8.0 via Governor
  • 🚀  Start MySQL and Upgrade System Tables

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest

Was it helpful ?

  • Happy
  • Normal
  • Sad
  • About
  • Contact
  • Docs
  • Features
  • Home

© 2026 Panel Web Hosting

  • About
  • Contact
  • Docs
  • Features
  • Home