Mysql error “too many connections” and how to resolve it

Recently I was looking for an easy way for MySQL Too Many Connections Fix. Though this was the first such error for me, I came to lớn know afterward that it is a pretty common error in MySQL. The solution khổng lồ this error is very easy as we only need to increase the number of mysql connections.

Bạn đang xem: Mysql error “too many connections” and how to resolve it

There are two ways using which we can resolve this error. We can either increase the number of mysql connections for the current session or we can make changes lớn increase the number of mysql connections permanently. In this tutorial, we will discuss both the methods for MySQL Too Many Connections Fix.


(Recommended Read: Step by step guide lớn reset root password in Mysql )

(Also Read: MariaDB administration commands for beginners )

Increasing mysql connections for the current session

Before we make changes lớn increase the number of mysql connections, we will check the current number of configured mysql connections. To kiểm tra it, connect lớn mysql from your terminal,

$ mysql –u root –p

Enter the password to connect khổng lồ mysql & once connected, execute the following command,

mysql> SHOW VARIABLES lượt thích "max_connections";


This will bring the max number of connections configured on the screen as output. Its usually 151 by default & we will now increase the value lớn 1000. To bởi so , run the following command from mysql terminal only,

mysql> mix GLOBAL max_connections = 1000;

Our maximum mysql connections value has now been increased lớn 1000 but its for the current session only. As soon as we restart the mysql service or restart the system, this value will reset khổng lồ default.

Increasing mysql connections for permanently

To increase the number of mysql connections permanently, we need lớn edit the mysql configuration file I.e. ‘/etc/my.cnf’. Open the file,

$ sudo vim /etc/my.cnf

& make the following entry in the file,

max_connections = 1000


Now save the file và exit, then restart the mysql service to implement the changes.

Xem thêm:

$ sudo systemctl restart mysqld

That’s it guys, this was our MySQL Too Many Connections Fix. Please do mention any other query you have khổng lồ use, using the bình luận box below.


If you think we have helped you or just want to tư vấn us, please consider these:-

Connect khổng lồ us: Facebook | Twitter

Linux TechLab is thankful for your continued support.


share Article:
mysql
Shusain

Passionate about Linux & xuất hiện source.Loves to learn, read & write about Linux as well as new technologies.


How lớn use Unzip Command in Linux
*

How vày i install Dropbox on Ubuntu (18.04 or other versions)
*

Leave a Reply Cancel reply

Save my name, email, & website in this browser for the next time I comment.

Δ


Search Bar
Social

Twitter Follow me!

Facebook Follow me!

Instagram Our photos!

Linkedin Visit me!

Pinterest sạc pin it!

Tumblr Visit me!


report this ad


Featured posts
Who Is a DevOps Engineer? Job Description, Role, và Skills
DevOps Trends That Will Matter Most in 2022
6 Attributes of a Successful e-Learning ứng dụng Development Company
The Main Reasons Linux Can Help You Become a Better Student
How to Increase Your Online Protection With Antivirus Software?
report this ad
Search Bar
Social

Twitter Follow me!

Facebook Follow me!

Instagram Our photos!

Linkedin Visit me!

Pinterest sạc it!

Tumblr Visit me!


Featured posts
Who Is a DevOps Engineer? Job Description, Role, & Skills
DevOps Trends That Will Matter Most in 2022
6 Attributes of a Successful e-Learning ứng dụng Development Company
The Main Reasons Linux Can Help You Become a Better Student
How to Increase Your Online Protection With Antivirus Software?
Recent Posts
Search Bar
Social

Twitter Follow me!

Facebook Follow me!

Instagram Our photos!

Linkedin Visit me!

Pinterest pin it!

Tumblr Visit me!


Featured posts
Who Is a DevOps Engineer? Job Description, Role, & Skills
DevOps Trends That Will Matter Most in 2022
6 Attributes of a Successful e-Learning tiện ích Development Company
The Main Reasons Linux Can Help You Become a Better Student
How khổng lồ Increase Your Online Protection With Antivirus Software?

appmobiles.info

report this ad

Light