Monday, 4 June 2012

Too many connections

The issue arises when ever the maximum number of connections allowed by the MySQL Server is exhausted. A possible workout is to increase the value of maximum connections parameter in MySQL.
In order to view the maximum number of connections allowed, launch to the MySQL console or go to bin directory in MySQL installation through your command prompt. Then type the below mentioned command
mysql> show variables like "max_connections";
The output shows the number of connections as below


To increase the number of maximum connections  use the below mentioned command
 
mysql> set global max_connections = 2000; 

 









Set desired value in place of 2000.



This will update the max_connections parameter. However, it does not changes the parameter value permanently. On the next MySQL restart it again reverts back to the default value. To change it permanently
changes need to be made in the my.ini file. In my.ini under the mysqld section the following line needs to be added

[mysqld]
max_connections = 2000

This update takes effect on the MySQL server restart and persists on subsequent restarts.



3 comments:

  1. A possible workout is to increase the value of maximum connections parameter in MySQL.By this blog easy to work on database and arrange the fields.
    link building

    ReplyDelete
  2. Hi, nice description about Too many connections in MySql.Thanks...

    -Aparna
    Theosoft

    ReplyDelete
  3. Thanks. It's awesome ,it is realy helpful, I appreciate it!

    Searchinfomedia

    ReplyDelete