Increase MySQL Connections Limit

Recently i got “too many connections” errors in MySQL, after quick research i found a solution to fix this issue.This issue due to connection limit of my MySQL installation.We can change the max_connections setting to allow more connections.

For windows based systems you can find and set max_connections settings at my.ini file. For example in xampp you can find the file at c:/xampp/mysql/bin/ this line max_connections = 1000 and restart xampp.

For Linux based systems fallow the below steps :

Locate the file named my.cnf in your server:

find / -name my.cnf

Generally it is stored in the following location:


Edit the file with vim command and find the max_connections string:

vi /etc/my.cnf

Uncomment max_connections and increase the limit to 1000 connections:

max_connections = 1000

Restart mysql service:

/etc/init.d/mysql restart

That’s it.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments Protection Status
Would love your thoughts, please comment.x