Cause 1: the automatic backup function of Mysql may cause the database to shut down the service during backup, but the server does not respond when it is started,
Start-run-services. msc. Open the windows service and find the mysql service. Double-click the recovery tab. The first failure is: "No operation" by default and changed to "Restart service ".
In the "Restart service: Minutes later" below, "0" indicates that the service will be restarted immediately if it is accidentally terminated. Click OK to make the settings take effect. When you wait for the mysql-ntprogress in the task manager, you will find that the progress does not fall. If you want to continue, this kind of mysql.exe cannot be stopped. If you want to stop, you must change the modification back .)
Cause 2: mysql connection problems may occur.
Modify the maximum number of connections of mysql and use the memory variable modification method to modify the maximum number of connections of mysql.
The procedure is as follows (applicable to both windows and linux platforms ):
A. log on to mysql from the client, enter the user name and password 'B', and set the new maximum number of connections to 500 at the mysql Command Prompt: mysql> set global max_connections = 500
C. display the currently running query: mysql> show processlist
D. display the current mysql system parameter status: mysql> show status # k;
E. exit the client: mysql> exit'
To view the maximum number of connections, run the following command in the directory where mysqladmin is located: mysqladmin-username-password variables | find "max_con. You can also use the mysql parameter list in myadmin in the php tutorial to view the maximum number of connections.
Disadvantage: After the computer is restarted or mysql, the maximum number of connections is reset to the initial value. You need to reset the value.
2. modify my. ini or my. cnf file method (mysql needs to be restarted). You can refer to the mysql configuration template in the same directory (small memory, large memory, large memory ). e open my. in the INI file, find the set-variable = max_connections = 100 line, change it to the maximum number of connections to be set, and then restart.
Linux console:
1. Open the my. cnf file: vi/etc/my. cnf
2. In the [mysqld] section, modify the value of max_connections to a set value.
Note:
The source and version of mysql may be different (in windows, the final installation results of mysql + iis and php + apache + mysql suite are almost different), my. the path of the INI file may be somewhat different, my. ini may retain a copy in the c: windows directory that needs to be modified at the same time.