Question about automatic Mysql service stop _ MySQL

Source: Internet
Author: User
Analysis of Mysql service automatic stop problem bitsCN.com cause 1: Mysql's automatic backup function 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.
BitsCN.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.