Two Methods for modifying the maximum number of connections of MYSQL in Windows

Source: Internet
Author: User

DocumentAfter the MYSQL database is installed, the default maximum number of connections is 100. Generally, the number of connections to forums or websites with a higher traffic is far from enough. There are two ways to increase the default number of connections to MYSQL.

The temporary method I use is as follows:

The maximum number of connections for MySQL is 100 by default. Client Logon: mysql-u username-p

Set the new maximum number of connections to 200: mysql> set GLOBAL max_connections = 200

Display the currently running Query: mysql> show processlist

Display Current status: mysql> show status

Exit the client: mysql> exit

View the current maximum number of connections: mysqladmin-u username-p password variables

The disadvantage of this method is that the modification fails after the server is restarted. It is best to use method 2 as follows:

Method 2: Go to the MYSQL installation directory and open the MYSQL configuration file my. ini or [mysqld] under my. cnf. Find max_connections = 100 and change it to max_connections = 1000 to restart MYSQL.

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.