How can I increase MySQL max connections?

Edit the file /etc/my.cnf

The file should look like this:

[mysqld]
set-variable = max_connections=500

Increase 500 to the number you desire.