Set the maximum number of MySQL connections in CentOS to 1040 too persistent connection

Source: Internet
Author: User

Set the maximum number of MySQL connections in CentOS to 1040 too persistent connection

Set the maximum number of MySQL connections in CentOS to 1040 too persistent connection

When the maximum number of connections is small, the error "1040 too connection" may occur.

You can modify the configuration file to modify the maximum number of connections, but I don't know where the configuration file is. What should I do?

First, restart the mysql service and run the command: service mysql restart

It may also be: service mysqld restart

Log on to mysql: mysql-uroot-p
Enter the password and press Enter;

After successful logon, run the following statement to query the current maximum number of connections:
Select VARIABLE_VALUE from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME = 'max _ CONNECTIONS ';

Run the following statement to modify the maximum number of connections:
Set global max_connections = 3600;

-------------------------------------- Split line --------------------------------------

Install MySQL in Ubuntu 14.04

MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL

Build a MySQL Master/Slave server in Ubuntu 14.04

Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS

Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04

-------------------------------------- Split line --------------------------------------

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.