The auto-adjust-mysql-limits Script
Overview
The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL® configuration values for the following cPanel & WHM settings:
- Allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration?
- Allow cPanel & WHM to determine the best value for your MySQL max_allowed_packet configuration?
- Allow cPanel & WHM to determine the best value for your MySQL innodb_buffer_pool_size configuration?
You can configure these settings in the SQL section of WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).
This script runs when whenever you update the MySQL-related tweak settings and when you transfer or restore an account.
Important:
You must run this script as the root user.
Run the script
To run this script on the command line, use the following format:
/usr/local/cpanel/scripts/auto-adjust-mysql-limits [options]
Options
Use the following options with this script:
Options |
Description |
Example |
--verbose |
Display messages about these limits when the script runs. |
/usr/local/cpanel/scripts/auto-adjust-mysql-limits --verbose |
--debug |
Do not update MySQL. |
/usr/local/cpanel/scripts/auto-adjust-mysql-limits --debug |
--help |
Display a help message. |
/usr/local/cpanel/scripts/auto-adjust-mysql-limits --help |
--no-restart |
Do not restart MySQL after the script runs. |
/usr/local/cpanel/scripts/auto-adjust-mysql-limits --no-restart |