如何增加mysql的最大连接数

最近网站老出现too many connections,只有加大mysql的最大连接数。
my.ini一般在mysql的安装目录的根目录下.
修改my.ini

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.

max_connections=100

将它改成更大的数值,如500