When you open MySQL, Tip 1040,too many connections

Source: Internet
Author: User

When you open MySQL, prompt 1040,too Many connections, so you can not open the database, see the contents of the table side.

This problem occurs because at the same time the number of connections to the database is too large, MySQL default maximum number of connections is 100, we can be in the command line mode

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.

We can modify the maximum number of connections for a database by: (Command-line method)

1. Login: Mysql-uusername-ppassword Enter, if the login is successful, the prompt will become mysql>. If you are prompted that MySQL is not inside

command, you can modify the contents of the previous log.

2. Set the new maximum number of connections to 300:set GLOBAL max_connections=300, enter. After success, prompt Qurrey OK. Such

The maximum number of connections has been modified successfully. You can proceed to the following command to view the relevant information, or exit directly.

3. Displays the currently running Query:show processlist.

4. Displays the current status: Show status.

5. Exit: Exit;

Lstsql

When you open MySQL, Tip 1040,too many connections

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.