How to restart mysql in windows _ MySQL

Source: Internet
Author: User
This article mainly introduces how to restart mysql in windows. if you need a friend, refer to the second method, which does not work for me. I will try again later!

I. MYSQL service

My computer -- (right-click) management -- services and applications -- services -- MYSQL -- Enable (stop, restart)

II. command line

Windows

1. click Start> run (shortcut: Win + R ).
2. start: enter net stop mysql
3. stop: Enter net start mysql

Prompt * Redhat Linux also supports service command, start: # service mysqld start stop: # service mysqld stop restart: # service mysqld restart

* In Windows, you cannot directly restart (restart). you can only stop the instance and start it again.

In fact, we can save it as mysqlreset. bat through batch processing.

The code is as follows:


Net stop mysql
Net start mysql

3. Too connector connections

379,578 Views created 56,071

Error No.: 1040
Problem analysis:

The number of connections exceeds the value set by MySQL. it is related to max_connections and wait_timeout. The larger the value of wait_timeout, the longer the idle waiting time for the connection, which leads to the larger number of current connections.

Solution:

1. for VM users, contact the space provider to optimize the configuration of the MySQL server;
2. for independent host users, contact the server administrator to optimize the configuration of the MySQL server. for details, refer:

Modify the parameters in the MySQL configuration file (my. ini in Windows and my. cnf in Linux:

CODE: [COPY]
Max_connections = 1000
Wait_timeout = 5

If you do not have one, add it by yourself. after modification, restart MySQL. if this error is reported frequently, check your server according to the server environment setup tutorial.

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.