1

I'm using MySQL Master-Slave replication for backup purposes (for a few days).

Today after changing to expire_logs_days = 3 on master and slave I got this message (from slave):

/etc/cron.daily/logrotate: 
/usr/bin/mysqladmin: refresh failed; error: 'Can't generate a unique log-filename mysqld-relay-bin.(1-999)'
error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1

I tried to google what that message mean ("Can't generate...") but only error message definitions found instead of explanation.

Currently I've about 50 bin-log files on slave (mysqld-relay-bin.000003 to mysqld-relay.bin.000052).

3
  • What version of mysql ??? May 28, 2013 at 20:56
  • mysqld Ver 5.5.30-1.1-log for debian-linux-gnu on x86_64 ((Debian))
    – Dawid Moś
    May 29, 2013 at 18:26
  • I'm seeing the same for mariadb :(
    – Fuzzy76
    Sep 11, 2013 at 11:37

2 Answers 2

0

Make sure the password set in /etc/mysql/debian.cnf for the debian-sys-maint user is the same for both the Master and the Slave, since the slave is an exact copy of the master, they have the same users table.

-2

This could happen if the opened files exceeded the mx open file limit set. Here is how you can increase max file limit http://duntuk.com/how-raise-ulimit-open-files-and-mysql-openfileslimit

1
  • 1
    From the Help Center, "Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."
    – D34DM347
    Jan 14, 2016 at 19:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .