Mysql "Too Many connections" error resolution

Source: Internet
Author: User
Tags mysql slow query log

1 Check the MySQL configuration of the two parameters max_connections "maximum number of connections" and wait_timeout "connection idle Wait Long", if the default value, please modify:

View the value of the maximum number of connections.

Mysqladmin-uusername-ppassword variables |find "Max_con"

Note that there is no space between-U and the user name in the above command, between-P and the password.

Set the new maximum number of connections

Set global max_connections=3000;
Set global wait_timeout=10;

And then restart MySQL to fix it.

or open the MySQL installation directory to open My.ini find Max_connections (on the 93rd line) by default is 1001-like settings to 500~1000 more appropriate, restart MySQL, so that 1040 errors will be resolved.

max_connections=1000

Be sure to restart MySQL to take effect

Of course, this solves the problem we still need to check is that the statement problem, we can use MySQL slow query log to enter the solution, this is not introduced, we can find on their own site on MySQL slow query log article Oh.

Related Article

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.