MySQL maximum number of connections modified

Source: Internet
Author: User

After the MySQL database installation is complete, the default maximum number of connections is 100, general traffic slightly larger forum or website this number of connections is far from enough, there are two ways to increase the default MySQL connection number

Method One: Enter the MySQL installation directory to open the MySQL profile My.ini or my.cnf find max_connections, if there are modifications max_connections=1000, if not directly added after [mysqld]

Re-starting MySQL in the service (services MySQL restart)

Method Two: MySQL maximum number of connections by default is 100 client login: Mysql-uusername-ppassword

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

Displays the currently running query:mysql> show processlist

Show current status:mysql> show status

Exit Client:mysql> Exit

To view the maximum number of connections currently: Mysqladmin-uusername-ppassword variables

MySQL maximum number of connections modified

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.