CloudLinux

Install and configure MySQL Governor on CloudLinux (root guide)

Install CloudLinux MySQL Governor on a cPanel server as root, choose the right database version, set the mode and per-user limits, and monitor restricted users with dbtop.

AdvancedCloudLinux server (root)2 min read

MySQL Governor tracks database usage per cPanel user and restricts users who overload the shared database server. On your own CloudLinux server you install it with a script that also installs Governor-aware MySQL or MariaDB packages.

MdmHost manages this on its hosting plans. This guide is for administrators of their own cPanel server with root access.

Before you start

  • CloudLinux on a cPanel server (see installing CloudLinux).
  • A full database backup; the installer replaces MySQL packages.
  • A maintenance window: the database restarts during installation.

Install

  1. Install the package:
    dnf -y install governor-mysql
  2. Choose the database version that matches what cPanel runs, for example MariaDB 10.6, and install:
    /usr/share/lve/dbgovernor/mysqlgovernor.py --mysql-version=mariadb106
    /usr/share/lve/dbgovernor/mysqlgovernor.py --install
  3. Follow the prompts. The script backs up and replaces the database packages with Governor-enabled builds.

Warning: Use the version names from CloudLinux's documentation for your release, and never downgrade the database version during installation. Check cPanel compatibility first.

Choose a mode

dbctl set-mode all

Modes decide which users are restricted. all monitors every user, abusers restricts only users who exceed limits, and off only monitors. Run dbctl --help for the modes on your version.

Set limits

Default limits apply to all users. View them with dbctl list, and set custom limits for specific users, for example:

dbctl set username --cpu=200,150,100,70

Limits are given for short to long periods. Start with the defaults, then adjust based on data.

Monitor

dbtop

dbtop shows database usage per user live, and which users are restricted. Restricted users run slower until usage drops (see MySQL Governor explained).

Upgrading the database later

With Governor installed, upgrade MySQL/MariaDB through the Governor script rather than only WHM's upgrade tool, so the packages stay in sync (see MySQL/MariaDB upgrade).

Troubleshooting

Database does not start after installation

Check the MySQL error log and the installer log; restore from backup if needed and contact CloudLinux support.

A user is always restricted

Their site runs heavy queries. Help them optimise, or raise their limit with dbctl.

Frequently asked questions

Does Governor slow down all queries?

No. Only users over their limits are restricted; everyone else runs normally.

Can resellers see Governor data?

No. It is root-level data. Users see the effects in Resource Usage.

Is Governor required on CloudLinux?

No, but it is recommended on shared servers where one site's queries can affect others.

How do I see current limits?

Run dbctl list to show default and per-user limits.

How do I lift a restriction now?

Use dbctl unrestrict username to remove a restriction immediately, for example after the user fixed a heavy query.

Does Governor work with MySQL 8?

CloudLinux publishes supported versions per release; check their documentation and match what cPanel supports.

Was this guide helpful?

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.