The default configuration for MySQL provided by cPanel is pretty barren. /etc/my.cnf
Thats it. One line. Its rubbish.
Here’s mine to help you along the way. Its got some decent logging set, some decent cache and memory options for a shared server set and some helpful security settings enabled.
max_connections = 200
bind-address = 127.0.0.1
# MySQL 4.x has query caching available.
# Enable it for vast improvement and it may be all you need to tweak.
# Reduced wait_timeout to prevent idle clients holding connections.
# Checked opened tables and adjusted accordingly after running for a while.
# Reduced it to 32 to prevent memory hogging.
# Reduced it by checking current size of *.MYI files.
log_error = /var/log/mysql/error.log
# log slow queries is a must.