Edit Database Configuration
Valid for versions 120 through the latest version
Version:
120
Last modified: June 13, 2024
Looking for this interface?
Your hosting provider can enable or disable this interface for resellers in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).
Overview
This interface allows you to make changes to your MySQL® or MariaDB® configuration. Changes you make in this interface will cause the MySQL or MariaDB services to restart.
-
In cPanel & WHM version 118 and earlier, we titled this interface Edit SQL Configuration and its section in the WHM interface SQL Services.
-
Not all settings are available in all versions of MySQL or MariaDB.
-
This interface accepts values with the following file size units:
-
K — Kilobytes
-
M — Megabytes
-
G — Gigabytes
-
P — Petabytes
-
E — Exabytes
-
This interface defaults to bytes if the user does not specify a file size unit.
-
Database Optimization
This interface suggests optimized database values for you based on your MySQL or MariaDB usage. You can also manually apply the suggested optimizations to individual settings.
These optimizations are general suggestions and may not result in increased database performance for all use cases.
- Click the document () icon to restore a setting to its default values.
- Click the arrow () icon to revert a setting to its previous value.
To apply the suggested optimizations for your database, perform the following steps:
- Click the Review Suggestions button. The Confirm Changes interface will appear.
- Click the Save button if you are satisfied with the suggested database settings.
To manually apply optimization suggestions to individual settings, perform the following steps:
- Click the gauge () icon. The Optimization menu will appear.
- Click Apply Optimization.
- Click the Save button located at the bottom of the Edit SQL interface.
Configuration Settings for MySQL and MariaDB
You can use this interface to adjust the following settings:
Setting |
Description |
Values |
Default |
---|---|---|---|
General Logging | This setting enables or disables the general query log. The query log contains information for data processed by the MySQL server. This setting is available in MySQL and MariaDB. |
|
Disable |
General Log File | This setting allows you to specify a custom name for the general log file. This setting is available in MySQL and MariaDB. | A text string. | server_hostname.log |
InnoDB Buffer Pool Chunk Size | This setting defines the size of the buffer that InnoDB uses to write to the log files on disk. This setting is available in MySQL and MariaDB.
Note:
MariaDB only supports this setting on versions 10.2 and later.
|
|
128M |
InnoDB Buffer Pool Instances | This setting specifies the number of InnoDB buffer pool instances. InnoDB Buffer Pool Instances help reduce contention and improve concurrency. This setting is available in MySQL and MariaDB.
Note:
|
|
1 |
InnoDB Buffer Pool Size | This setting defines the InnoDB buffer pool size. The InnoDB buffer pool is the memory area where InnoDB caches table and index data. This setting is available in MySQL and MariaDB. |
|
128M |
InnoDB Log Buffer Size | This setting allows you to specify the InnoDB log buffer size. The InnoDB log buffer holds data in memory before the system writes it to the log files. This setting is available in MySQL and MariaDB. |
|
16M |
InnoDB Log File Size | The InnoDB log file defines the size of each log file. This setting is available in MySQL and MariaDB. |
|
48M |
InnoDB Sort Buffer Size | This setting defines the size of the InnoDB sort buffer. The InnoDB sort buffer sets the following values:
|
|
1M |
Interactive Timeout | This setting allows you to specify the number of seconds the server waits for an idle connection before closing it. This setting is available in MySQL and MariaDB. |
|
28 |
Join Buffer Size | This setting defines the minimum size of the buffer for plain index scans, range index scans, and joins that perform full table scans. This setting is available in MySQL and MariaDB. |
|
256K |
Key Buffer Size | The key buffer size is the size of the buffer used for index blocks. The key buffer is also known as the key cache. The key buffer holds the index blocks used by MyISAM tables. This setting is available in MySQL and MariaDB. |
|
128M |
Error Log File Name | This setting allows you to specify the name of the Error Log. This setting is available in MySQL and MariaDB. | A text string. | /var/log/mysqld.log |
Error Log Verbosity | This setting allows you to specify the level of verbosity in the error log.
Note:
This setting is only available on MySQL version 5.7 or later. This setting is not available on MariaDB.
|
|
3 |
Log Warnings | This setting allows you to specify which additional warnings are logged. Larger numbers increase verbosity. This setting is available in MySQL and MariaDB. | A valid log warning value. For more information about log warning values, read the MySQL or MariaDB log warning documentation. | 2 |
Log Output | This setting allows you to specify the format of the general log and slow query log output. More than one setting can be active. This setting is available in MySQL and MariaDB. |
|
File |
Long Query Time | This setting specifies the maximum number of seconds a query can run before it is logged to the slow query log file. This setting is available in MySQL and MariaDB.
Note:
This setting accepts decimal values and has microsecond precision.
|
|
10 |
Max Allowed Packet | This setting allows you to specify the maximum size of one packet or any generated/intermediate string. This setting is available in MySQL and MariaDB. |
|
256M |
Max Connect Errors | This setting allows you to specify the number of failed connection attempts before the server blocks the connection. This setting is available in MySQL and MariaDB.
Note:
This setting does not protect against brute force attempts.
|
|
100 |
Max Connections | This setting allows you to specify the maximum number of concurrent client connections. This setting is available in MySQL and MariaDB. |
|
151 |
Max Heap Table Size | This setting allows you to specify the maximum size to which user-created MEMORY tables are permitted to grow. This setting is available in MySQL and MariaDB. |
|
3G |
Open Files Limit | This setting allows you to specify the maximum number of file descriptors available for use. This setting is available in MySQL and MariaDB. |
|
40 |
Performance Schema | The Performance Schema is a tool to help a database administrator do performance tuning. This setting is available in MySQL and MariaDB.
Note:
All MySQL Performance Schema settings also work in MariaDB.
|
|
Disable |
Query Cache Size | This setting allows you to specify the amount of memory reserved for caching query results. This setting is available in MySQL and MariaDB.
Note:
MySQL deprecated this setting in version 5.7.
|
|
1M |
Query Cache Type | This setting determines query cache behavior for all clients that connect to the server. This setting is available in MySQL and MariaDB. |
|
0 |
Read Buffer Size | This setting does the following:
|
|
128K |
Read Random Buffer Size | This setting allows you to specify the size of the read random buffer. The read random buffer reads rows from the MyISAM table in sorted order after a key sort. This setting is available in MySQL and MariaDB. |
|
256K |
Slow Query Log
Note:
In MariaDB version 10.11 and later, this setting is Log Slow Queries.
|
This setting allows you to enable or disable the slow query log. Enable the slow query log to find queries that take a long time to execute. The slow query log consists of the following:
|
|
Disable |
Slow Query Log File Name | This setting allows you to specify the name or full path of the slow query log file. | The name or full path of the slow query log file. | server_hostname-slow.log |
Sort Buffer Size | This setting defines the following:
|
|
256K |
SQL Mode | MySQL and MariaDB can apply different SQL Modes depending on the value of this setting. | A comma-delimited list of modes to activate. For more information about SQL Mode values, read the MySQL or MariaDB SQL Mode documentation. | Click the link to download the default settings. |
Thread Cache Size | This setting allows you to specify the number of threads the server stores in a cache to use. This setting is available in MySQL and MariaDB |
|
256 |
Temporary Table Size | This setting allows you to specify the size of internal, in-memory, temporary tables. The temporary table size does not apply to user-created MEMORY tables. This setting is available in MySQL and MariaDB.
Note:
The value of
Max Heap Table Size will override this setting if it is a smaller value.
|
|
16M |
Wait Timeout | This setting allows you to specify the maximum number of seconds the server waits on an idle connection before closing it. This setting is available in MySQL and MariaDB |
|
28800 |