When you open MySQL, prompt 1040,too Many connections, so you can not open the database, see the contents of the table side.
This problem occurs because at the same time the number of connections to the database is too large, MySQL default maximum number of connections is 100, we can be in the command line mode
View the value of the maximum number of connections.
Mysqladmin-uusername-ppassword variables |find "Max_con"
Note that there is no space between-U and the user name in the above command, between-P and the password.
We can modify the maximum number of connections for a database by: (Command-line method)
1. Login: Mysql-uusername-ppassword Enter, if the login is successful, the prompt will become mysql>. If you are prompted that MySQL is not inside
command, you can modify the contents of the previous log.
2. Set the new maximum number of connections to 300:set GLOBAL max_connections=300, enter. After success, prompt Qurrey OK. Such
The maximum number of connections has been modified successfully. You can proceed to the following command to view the relevant information, or exit directly.
3. Displays the currently running Query:show processlist.
4. Displays the current status: Show status.
5. Exit: Exit;
Lstsql
When you open MySQL, Tip 1040,too many connections