The "1040 Too many Connection" error may occur when the maximum number of connections is more than an hour.
Can change the configuration file to change the maximum number of connections, but I even do not know where the configuration file, what should I do?
First, you need to restart the MySQL service, run the command: service MySQL restart
It may also be: Service mysqld restart
Login Mysql:mysql-uroot-p
input password, enter;
After successful logon, run the following statement to query the current maximum number of connections:
Select Variable_value from INFORMATION_SCHEMA. Global_variables where variable_name= ' max_connections ';
Run the following statement to change the maximum number of connections:
Set global max_connections = 3600;
Note: This method only temporarily changes the maximum number of connections, and once again starts the MySQL service and then restores.
To solve this problem:
To completely solve this problem or to change the MY.CNF configuration file, here use VI to change, enter the command: VI/USR/MY.CNF return, open the file and press "I" key to enter the editing state;
Join "[mysqld]" below? " max_connections=3600 ", press ESC to enter command mode, enter": Wq "carriage return (save and exit).
Running: Service MySQL Restart again starts MySQL services;
Note: Very many articles mention "[Mysqld]" under "Add"? Set -variable=max_connections= + "No, not at all, after adding the service will not start."
My environment is: CentOS 6.5 MySQL 5.6
Maximum number of MySQL connections under CentOS Setup 1040 too many connection