Edit /etc/my.cnf or /etc/mysql/my.cnf and add the following lines to the [mysqld] section:
set-variable = expire_logs_days=90 set-variable = max_connections=11000 set-variable = max_user_connections=10000 set-variable = query-cache-size=256M set-variable = wait_timeout=172800