11/29/2023 0 Comments Mysql connection limit![]() If you have any queries and problem please comment in comment section or you can also ask your question. Read our another article Basic Mysql Commands For Database Administrator and Step-by-step mysql 5.6 server installation on centos 6.x and redhat 6.x. I hope this article will be helpful to fix MySQL Error: Too many connections in MySQL. Note : Increasing the max_connections value according to your server RAM and resources to handle the more MySQL queries. Now this time you can see the value is set to 150. mysql> show variables like "max_connections" max_connections = 150Īfter changing the value restart the MySQL server and check the value again. Update the /etc/my.cnf file and add the below setting under the section. ![]() In CentOS, RHEL and Fedora you can find the mysql configuration file at /etc/my.cnf location. mysql> SET GLOBAL max_connections = 150 Edit my.cnf file to update max_connections value To set this value permanently you will need to update the my.cnf configuration file. This will work immediately but it will be reset to its previous value e.g to 66 after restarting MySQL server. We can change the setting to e.g 150 with below command without restarting the MySQL server. Increase and Update max_connections Valueīefore increasing the value I assume you have enough RAM and resources to handle the increased number and more queries. mysql> show variables like "max_connections" Īs you can see above output the max_connections value is configured to 66. Login to MySQL and run the below command. Value are saved with variable named max_connections. You can check the current max_connections setting following below SQL command. I assume you have enough RAM on server to handle the increased number. In this tutorial I am going to explain how we can fix max_connections (MySQL Error: Too many connections) MySQL Error updating the max_connections value in MySQL. ![]() Most of time I have noticed this happens when either bugs in applications not closing connections properly or due to wrong design. It happens when server reach the limit of max_connections. Which indicates that all available connections are in use by other clients. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |