What is the maximum number of connections of mysql?

Source: Internet
Author: User
I mean, what is a connection? If a process connects to mysql and mysql assigns a process to connect to PHP, is this a connection? For example, the maximum number of connections in mysql is 50, does it mean that there are 50 waiters in the restaurant mysql, right? If you use persistence..., what does it mean to be a connection?
If a process connects to mysql and mysql assigns a process to connect to PHP, is this a connection?
For example, the maximum number of connections in mysql is 50, does it mean that there are 50 waiters in the restaurant mysql, right?
If persistent connection is used, it means that this waiter only serves a specific customer (php process), and other customers cannot use this waiter, right ???

Reply content:

I mean, what is a connection?
If a process connects to mysql and mysql assigns a process to connect to PHP, is this a connection?
For example, the maximum number of connections in mysql is 50, does it mean that there are 50 waiters in the restaurant mysql, right?
If persistent connection is used, it means that this waiter only serves a specific customer (php process), and other customers cannot use this waiter, right ???

You are right.

However, in the early stage of PHP, it is better to take the connection to complete the disconnection, because the database generally supports a low level of concurrent connections. The persistent connection you mentioned is generally used in the connection pool technology. The application code maintains the SQL queue by itself, which is used to thoroughly squeeze the database performance.

Mysql is a total of 50 places in your restaurant, and one is missing for each use. If your 50 seats are full. But guests can still come in to your restaurant. But there is no place to eat. There are too few meals (too few connections ). Increasing the number of connections means increasing the number of meals.

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.