MySQL optimized-mysql maximum number of connections

Source: Internet
Author: User

########################### Modify MySQL Maximum connection number ###############################

After the MySQL database installation is complete, the default maximum number of connections is 100.

The general production environment of the forum or website is not enough, the following provides two ways to modify the maximum number of MySQL connections


----------------------Method 1: Modify the maximum number of MySQL connections online---------------------------

Features: For MySQL in the use of the failure to restart the situation, can be modified in the MySQL runtime immediately effective, restart failure


Log in to the MySQL server that needs to be modified:

Mysql-uusername-ppassword

Set the new maximum number of connections to 500:

Set GLOBAL max_connections=500;

To view the current maximum number of connections settings:

Show variables like '%max_connections% ';

To view the currently running query:

Show Processlist;

To view the current status:

Show status;

-----------------------Method 2: Permanently modify the maximum number of MySQL connections------------------------

Features: Configuration that requires permanent entry


Modify the/ETC/MY.CNF configuration file, modify or add

max_connections=500

Save to restart MySQL server

############################# End ##############################################


This article is from the "Qin Notes" blog, please be sure to keep this source http://ciqin.blog.51cto.com/10608412/1788416

MySQL optimized-mysql maximum number of connections

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.