Arama Yap Mesaj Gönder
Biz Sizi Arayalım
+90
X
X
X
X

Knowledge Base

Homepage Knowledge Base General What is MySQL Governor and How to I...

Bize Ulaşın

Konum Halkalı merkez mahallesi fatih cd ozgur apt no 46 , Küçükçekmece , İstanbul , 34303 , TR

What is MySQL Governor and How to Integrate it with MariaDB and MySQL on CloudLinux Servers?

What is MySQL Governor?

MySQL Governor is a module developed by CloudLinux that is used to monitor and limit MySQL or MariaDB loads on shared servers. It monitors resource-intensive MySQL queries in real-time and automatically manages users who exceed the limits.

The main purpose of this tool is to prevent database loading from harming other sites. Especially in shared hosting environments, thanks to MySQL Governor, the CPU and IO usage of each user can be limited.


How to Install MySQL Governor?

  1. Prepare the CloudLinux environment:

    yum groupinstall alt-server -y
    
  2. Install the MySQL Governor package:

    yum install governor-mysql -y
    
  3. Install the compatible version instead of the default MySQL/MariaDB:

    governor-mysql install --mysql-version=mariadb103
    

    Supported versions:

    • MariaDB 10.1 - 10.11

    • MySQL 5.6 / 5.7 / 8.0

  4. If upgrading (existing MySQL/MariaDB):

    cl-update-db --mysql-version=mysql80
    
  5. Enable MySQL Governor:

    /usr/share/lve/dbgovernor/mysqlgovernor.py --install
    
  6. Test if it is working:

    dbtop
    

    With this command, you can instantly monitor the IO and CPU usage of active users.


MariaDB or MySQL Upgrade Process (On Existing Servers)

After MySQL Governor is activated, the existing MySQL version can be edited.

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

Note: This module does not work stably without using the CloudLinux kernel. In addition, it must be compatible with CageFS and LVE.


Advantages

  • MySQL queries that use high resources are instantly monitored.

  • Overload problems on the server are minimized.

  • CPU and IO based user limits can be applied.

  • Queries with attack characteristics can be terminated automatically.

  • Integrated monitoring with the WHM panel becomes possible.


Disadvantages / Things to Consider

  • Since it is a kernel-based system, it only works in the CloudLinux environment.

  • A database backup must be taken before installation.

  • Malfunctions may occur in incompatible WHM/cPanel systems.


Usage Via WHM Panel

WHM > CloudLinux LVE Manager > The following operations can be performed from the MySQL Governor tab:

  • Active MySQL usage graph

  • Setting query limits on a per-user basis

  • Reviewing logs of previous installations


Conclusion

If you are managing a hosting infrastructure in a CloudLinux environment, the MySQL Governor module is absolutely essential for ensuring system stability and resource balance between other customers. It can be integrated with just a few lines of code and controlled from the WHM panel.

 

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(1768 times viewed / 343 people found it helpful)

Call now to get more detailed information about our products and services.

Top