When you need to start doing tuning on your database, the first thing you need to modify is the configuration file. So far, it is easy to do this; the ugly part of this is, that you may need to restart the database daemon if you change a variable. Good news! Some of those variables do not need a server restart.
First, check if the variable you need to modify is dynamic. If it is, do the following:
To verify the current value: SELECT @@max_connections;
To change the value: SET GLOBAL max_connections = 1024;
Enjoy!