Author Topic: max_connections in mysqld.cnf not change from 214 in ubuntu 16.04 mysql 5.7  (Read 7436 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
max_connections in mysqld.cnf not change from 214 in ubuntu 16.04 mysql 5.7
« on: มกราคม 15, 2019, 08:16:33 PM »
วันนี้เจอเคส เมื่อ
max_connections in mysqld.cnf not change from 214 in ubuntu 16.04 mysql 5.7

#### Begin Fixed max_connections =5120 in /etc/mysql/mysql.conf.d/mysqld.cnf ####
Follow the following steps:

cp /lib/systemd/system/mysql.service /etc/systemd/system/
echo -e "\r\nLimitNOFILE=infinity" >> /etc/systemd/system/mysql.service
echo "LimitMEMLOCK=infinity" >> /etc/systemd/system/mysql.service
sudo systemctl daemon-reload
sudo service mysql restart
And change or add he following line into file /etc/mysql/mysql.conf.d/mysqld.cnf :

[mysqld]
max_connections=110
#### Finish Fixed max_connections =5120 in /etc/mysql/mysql.conf.d/mysqld.cnf ####