错误:Can not connect to MySQL server. Too many connections -mysql 1040错误
This is because the number of connections to access Mysql, unreleased already reached the upper limit of lead. If you do not own configuration, installed by default is the maximum number of connections Mysql 100
The first method: the time limit is not reached, the command line directly modified
mysql - -uroot - -ppassword login mysql # the Variables Show like "max_connections"; # to view the current maximum number of connections to the SET , Ltd. Free Join max_connections = 10000; # 1000 set the maximum number of connections # Again to see if the amendment is successful, see has become 1000 Exit # exit
The maximum number of connections this modified approach, as long as a database restart, will return to the initial state
To permanent, then we have to modify configuration files
The second method: Modify Profile
It is a change in the Mysql my.ini or my.cnf parameter max_connections
Be changed to max_connections = 1000, and then restart the database enough
(If you can not find my.ini file where you can use the Find command to search it)
find / -name my.ini