Reason analysis and solution of MySQL automatic stop

Source: Internet
Author: User
Keywords Web programming MySQL Tutorial
Tags analysis automatic change click connections default directory file

Reason analysis and solution of automatic stop of MySQL tutorial

Start Menu-run-services.msc

Find MySQL Services and double-click

Click on the Recovery tab

First failure: Default is no action, change to restart service.

Adding "0" at the bottom of "Restart Service: ___ Minutes" means that the service restarts immediately if it terminates unexpectedly.

Click OK to make the settings effective.

When you end the MYSQL-NT process in the Task Manager, you'll find that it's not over.

However, it should be noted that such mysql.exe can not stop, if you have to stop the changes have just changed back.


Analysis reason two, possibly MySQL connection problem

To modify the maximum number of connections for MySQL

1, use the memory variable modification method to modify the MySQL maximum connection number

The steps are as follows (both Windows and Linux platforms apply):

A, the client login MySQL, enter the username and password

b, set the new maximum number of connections at the MySQL command prompt to 500: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

E, exit client:mysql> exit

Viewing the current maximum number of connections only needs to be seen by executing the following command in the Mysqladmin directory: Mysqladmin-username-password variables |find "Max_con". You can also use the MySQL parameter list in the PHP tutorial myadmin to view the maximum number of connections.

Disadvantage: Restart the computer or MySQL after the maximum number of connections will reset to the original value, need to reset.

2, modify My.ini or My.cnf file method (need to restart MySQL), can refer to the same directory MySQL configuration template (small memory, large memory, large memory)

Under Windows system:

Open the My.ini file to find the set-variable =max_connections=100 line, change to the maximum number of connections you need to set, and then restart.

Under the Linux console:

Open my.cnf File: vi/etc/my.cnf

Modify the value of max_connections under [mysqld] to a set value.

Days Note: You may have installed MySQL source and version of different (Windows Mysql+iis and php+apache+mysql Suite final installation results are almost different), My.ini file path may be a little differently, My.ini may also retain a copy of the C: Windows directory needs to be modified at the same time

Related Article

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.