# max\_connections setting my my.cnf does not work

**URL:** <https://forums.percona.com/t/max-connections-setting-my-my-cnf-does-not-work/7611>\
**Category:** Percona Server for MySQL 5.7\
**Tags:** mysql, percona\
**Created:** [May 10, 2020, 7:17pm UTC](https://forums.percona.com/t/max-connections-setting-my-my-cnf-does-not-work/7611 "2020-05-10T19:17:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roushenas](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@roushenas](https://forums.percona.com/u/roushenas)\
**Post date:** [May 10, 2020, 7:17pm UTC](https://forums.percona.com/t/max-connections-setting-my-my-cnf-does-not-work/7611/1 "2020-05-10T19:17:23Z")

</div>

I am using Percona Server 5.7 on my VPS, and I have an issue with the setting of max\_connections is the config file. The default value is 151, and I wanna increase it to 200. I can do it simply by running this query on the mysql command line:set GLOBAL max\_connections = 200;&nbsp; # even I can set it to 500 without any issue in the command line.But when it comes to the configuration file, it does not work. Even I am unable to set it to 152. I edited this file on my CentOS 8 machine: /etc/my.cnf.d/mysql.What is wrong with my config file?

---

<div class="post-metadata">

**Author:** ![roushenas](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@roushenas](https://forums.percona.com/u/roushenas)\
**Post date:** [May 11, 2020, 12:02am UTC](https://forums.percona.com/t/max-connections-setting-my-my-cnf-does-not-work/7611/2 "2020-05-11T00:02:57Z")

</div>

I added the following settings to my.cnf, still no chance:table\_open\_cache = 8000  
innodb\_file\_per\_table = 1  
open-files-limit = 8192

---

<div class="post-metadata">

**Author:** ![roushenas](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@roushenas](https://forums.percona.com/u/roushenas)\
**Post date:** [May 11, 2020, 12:17am UTC](https://forums.percona.com/t/max-connections-setting-my-my-cnf-does-not-work/7611/3 "2020-05-11T00:17:37Z")

</div>

I found the issue, I should set the values in /etc/percona-server.conf.d/mysqld.cnf, while I was saving them in /etc/my.cnf.d/mysql.cnf.
