mysql -uroot -pxxxxxxx -se "show variables" | grep max_connections
max_connections 151
Defualt value:- 151
Range :- 1 to 100000
You change these things in 3 ways:-
1) Using my.cnf
Default options are read from the following files in the given order:
a) /etc/my.cnf
b) /etc/mysql/my.cnf
c) /usr/etc/my.cnf
d) ~/.my.cnf
You have to put "max_connections" field name under [mysqld] heading...
2) you can pass this as a parameter to mysqld process
--max_delayed_threads=300
3) you can changes this value in mysql console as well
mysql> select @@global.max_connections;
+-------------------------------+
| @@max_connections |
+-------------------------------+
| 151 |
+-------------------------------+
1 row in set (0.00 sec)
mysql> set @@global.max_connections=152;
Query OK, 0 rows affected (0.00 sec)
1 row in set (0.00 sec)
if we change like this when you restart mysql, it will fallback to default value.
Reference:-
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_connections