# expire\_log\_days can't be set in my.cnf

**URL:** <https://forums.percona.com/t/expire-log-days-cant-be-set-in-my-cnf/6054>\
**Category:** Other MySQL® Questions\
**Created:** [December 6, 2017, 12:10pm UTC](https://forums.percona.com/t/expire-log-days-cant-be-set-in-my-cnf/6054 "2017-12-06T12:10:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![grant\_edmunds](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@grant\_edmunds](https://forums.percona.com/u/grant_edmunds)\
**Post date:** [December 6, 2017, 12:10pm UTC](https://forums.percona.com/t/expire-log-days-cant-be-set-in-my-cnf/6054/1 "2017-12-06T12:10:05Z")

</div>

I’m running 5.7.19-17-log and I can’t set expire\_log\_days in the my.cnf. I’ve tried under [mysqld] and [mysqld-safe]. Is this a bug? error logfile message: 2017-12-06T17:38:26.486560Z 0 [ERROR] unknown variable ‘expire\_log\_days=5’

---

<div class="post-metadata">

**Author:** ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)\
**Post date:** [December 7, 2017, 4:18am UTC](https://forums.percona.com/t/expire-log-days-cant-be-set-in-my-cnf/6054/2 "2017-12-07T04:18:55Z")

</div>

hello I think the parameter is expire\_logs\_days (plural on logs)?  
Easily done. There is a bit of a discussion about expire\_logs\_days in this blog post too [url][https://www.percona.com/blog/2014/01/28/10-mysql-performance-tuning-settings-after-installation/[/url]](https://www.percona.com/blog/2014/01/28/10-mysql-performance-tuning-settings-after-installation/%5B/url%5D)
