Starting from MySQL Governor version 1.0+, it contains two modes of operation that allows running users queries inside their LVE:
Abusers - Use LVE for a user to restrict queries (default mode): In that mode, once the user goes over the limits specified in the MySQL Governor, all customer's queries will execute inside that user's LVE. We believe this mode will help with the condition when the site is still fast, but MySQL is slow (restricted) for that user. If someone abuses MySQL, it will cause queries to share LVE with PHP processes, and PHP processes will also be throttled, causing fewer new queries being sent to MySQL. *Requires dbuser-map file.
Off - Monitor Only: In that mode MySQL Governor will not throttle customer's queries, instead it will let you monitor the MySQL usage to see the abusers at any given moment in time (and historically). This mode is good when you are just starting and want to see what is going on.
Warning: The "All" mode will be deprecated starting from September 1, 2021. You can read more here.
The mode of operation can be specified with dbctl tool, for example:
# dbctl --lve-mode abusers
Abusers is currently the default mode of operation. Both modes require correct user -> database mapping within the /etc/container/dbuser-map file. With the latest version, we automatically generate user -> database user mapping for cPanel, Plesk and DirectAdmin control panels. The format of the file is:
[dbuser_name1] [account_name1] [UID1]
[dbuser_name2] [account_name2] [UID2]
[dbuser_nameN] [account_nameN] [UIDN]
The file is being checked for modifications every 5 minutes. If you need to force reload the mapping file, run:
service db_governor restart
You can also rebuild the mapping file manually on cPanel, Plesk and DirectAdmin control panels by running the following command: