Tweak Settings — SQL

Valid for version 110

Version:

110

112

116

118

120

124

Last modified: October 10, 2024


The SQL section includes the following settings:

Setting Description Values Default
Include databases in disk usage calculations If you enable this setting, your server will include databases in disk usage calculations.
  • On — Enable.
  • Off — Disable.
On
Use INFORMATION_SCHEMA to acquire MySQL disk usage This setting uses MySQL’s INFORMATION_SCHEMA view to include MySQL table disk usage when it calculates disk usage totals. This setting causes MySQL to become unresponsive until data collection finishes, which may degrade your system’s performance.

If you disable this setting, cPanel & WHM queries the filesystem for MySQL’s disk usage information. Table type usage and local configuration may cause inaccuracy in the disk usage totals.
  • On — Enable.
  • Off — Disable.
On
Allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration? This setting allows cPanel & WHM to determine the best value for your MySQL open_files_limit setting in the /etc/systemd/system/ MySQL file. The system uses the total number of open tables in your databases to determine this value.
Newer versions of MySQL require additional file descriptors for each open table. A server with a large number of open tables (for example, servers with multiple installations of WordPress®) may require an open_files_limit value that is greater than the default value of 2048. However, an extremely large open_files_limit setting requires more memory, and may cause performance issues.
We recommend that you do not manually adjust the open_files_limit setting in the /etc/systemd/system/ MySQL file. If you manually adjust this setting and add more databases and tables, the system will not increase the limit. When you surpass the limit, you will receive an error.
  • On — Enable.
  • Off — Disable.
On
Allow cPanel & WHM to determine the best value for your MySQL max_allowed_packet configuration? This setting allows cPanel to determine the best value for your MySQL max_allowed_packet setting in your server’s my.cnf configuration file. The max_allowed_packet setting determines the maximum size of a single packet for any generated or intermediate string. The value of this setting must be large enough to properly handle very long BLOB columns or long strings. However, an extremely large max_allowed_packet setting may catch unnecessarily large packets, and may cause performance issues.
We recommend that you do not manually adjust the max_allowed_packet setting in your server’s my.cnf file. If you manually adjust this setting and add more databases and tables, the system will not increase the limit. When the system surpasses the limit, you will receive an error.
  • On — Enable.
  • Off — Disable.
On
Allow cPanel & WHM to determine the best value for your MySQL innodb_buffer_pool_size configuration? This setting allows cPanel & WHM to determine the best value for your MySQL innodb_buffer_pool_size setting in your server’s my.cnf configuration file. The innodb_buffer_pool_size setting determines the size of the memory buffer in bytes that the InnoDB storage engine uses to cache data and indexes of its tables. However, an extremely large innodb_buffer_pool_size setting requires more memory and may cause performance issues.
We recommend that you do not manually adjust the innodb_buffer_pool_size setting in your server’s my.cnf file. If you manually adjust this setting and add more databases and tables, the system will not increase the limit. When you surpass the limit, you will receive an error.
  • On — Enable.
    If you select On for this setting, the system uses the following defaults:
    • For servers with less than 512 Megabytes (MB) of RAM, the system sets the innodb_buffer_pool_size setting to 8 MB.
    • For servers with between 512 MB and 4 Gigabytes (GB) of RAM, the system sets the innodb_buffer_pool_size setting to a proportional value that is between 8 and 128 MB.
    • For servers with more than 4 GB of RAM, the system sets the innodb_buffer_pool_size setting to 128 MB.
  • Off — Disable.
Off
Require a username prefix on names of new databases and database users When you enable database prefixing, the system prefixes database names and database usernames with a portion of the system username and an underscore.
  • MySQL and PostgreSQL — The prefix uses the first eight characters of the system username and an underscore.
  • MariaDB — The prefix uses the entire system username and an underscore.
This setting makes it easier for you to determine which user owns a given database. However, it reduces the number of characters that users can use for names of databases and database users.
  • If you change the system account name, database names and database usernames that the account owns do not change.
  • This setting is global and you cannot require prefixing selectively. However, you can create individual databases that do not require prefixing. To do this, disable this setting, create the desired databases, then enable this setting again.
  • On — Enable.
  • Off — Disable. This allows cPanel users to create individual databases without prefixes. After they create the databases, you can reenable the setting for your users’ accounts.
On
Force short prefix for MySQL and MariaDB databases If you enable this setting, your server will limit MySQL and MariaDB database prefixes to eight characters.
  • On — Enable.
  • Off — Disable.
Off