title: expire_logs_days ignored in my.cnf
body: <p>I've got a pair of MySQL databases that are set up for Master Slave replication. The slave is doing just fine.</p>
  
  <p>The master, on the other hand, has been hoarding binary logs despite my best (automated) efforts. </p>
  
  <p>I'm trying to set up the 'expire_logs_days' variable in MySQL's my.cnf file, but for some reason it seems to be being ignored. My my.cnf file looks something like:</p>
  
  <pre><code>[mysqld]
  ...
  log-bin=/var/log/mysql/mysql-bin.log
  server-id=1
  expire_logs_days=3
  log_bin_trust_function_creators=TRUE
  sync_binlog=1
  
  [mysqld_safe]
  ...
  </code></pre>
  
  <p>But when I run <code>SHOW VARIABLES WHERE Variable_Name='expire_logs_days'</code> in MySQL, it returns me a value of <code>0</code></p>
  
  <p>I've tried:</p>
  
  <ul>
  <li>Restarting MySQL</li>
  <li>Using this line: <code>expire_logs_days='3'</code></li>
  <li>Checked for other my.cnf files:
  <ul>
  <li><code>mysqld --help --verbose | grep cnf</code></li>
  <li>Found the line: <code>/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf order of preference</code></li>
  <li>My <code>my.cnf</code> file is located at <code>/etc/my.cnf</code></li>
  <li>There are no files called my.cnf in the other locations</li>
  </ul></li>
  <li><code>SET GLOBAL expire_logs_days=3</code> DOES work within MySQL, but doesn't really solve my problem per se</li>
  </ul>
  
  <p>And that's about all I could think to do. I've run the manual PURGE command, which works just fine, but I'd prefer (although, if there's no way around it, I'll do it anyway) to not run the PURGE command using cron.</p>
  
  <p>Anybody have any ideas? I'm just about tapped.</p>
  
  <p>Thanks.</p>