I want to change max_connections via /etc/my.cnf but it seems to not work.
mysql> select variable_name, variable_value
from global_variables
where variable_name = 'max_connections';
+-----------------+----------------+
| variable_name | variable_value |
+-----------------+----------------+
| MAX_CONNECTIONS | 300 |
+-----------------+----------------+
After restarting ...
$ sudo /usr/local/mysql/support-files/mysql.server restart
Shutting down MySQL
.... SUCCESS!
Starting MySQL
.. SUCCESS!
With this configuration file.
$ cat /etc/my.cnf
[mysqld]
max_connections=500
I still get 300.
This is my mysql version:
mysql Ver 14.14 Distrib 5.6.15, for osx10.7 (i386) using EditLine wrapper
Edit (1):
Typing "$ mysql --help | grep Default -A 1" I can get
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
But I've only /etc/my.cnf
Edit (with solution) (2):
With "$ locate my.cnf" I can see that my configuration file to edit must be /usr/local/mysql-5.6.15-osx10.7-x86/my.cnf Modifing max_connections in this file I succesfully obtain 500 as MAX_CONNECTION value
mysql> select variable_name, variable_value
from global_variables
where variable_name = 'max_connections';
+-----------------+----------------+
| variable_name | variable_value |
+-----------------+----------------+
| MAX_CONNECTIONS | 500 |
+-----------------+----------------+