MySQL Max Connections on OS X Server

To change the ‘max_connections’ for MySQL on OS X, modify the ‘my.cnf’ file located in /etc.

/etc ---> my.cnf

If this is the first time you are modifying the maximum number of connections, then you will not find the variable in the config file. This is because MySQL is built with 100 maximum connections by default. If you want to increase it to anything above 100 then you will need to manually add the variable. You simply add the following line. Adjusting the amount for your situation.

max_connections = 500

Adding or modifying this variable if often neccessary when you are receiving the error ‘Too many connections’.

The location of the ‘my.cnf’ config file is located in /etc for the version of MySQL that comes preloaded with OS X server. If you have installed MySQL seperatley then the config file might be located in a different directory.

MySQL
You must be logged in to post a comment.