0

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).

  • What version of mysql ??? – RolandoMySQLDBA May 28 '13 at 20:56
  • mysqld Ver 5.5.30-1.1-log for debian-linux-gnu on x86_64 ((Debian)) – daftu May 29 '13 at 18:26
  • I'm seeing the same for mariadb :( – Fuzzy76 Sep 11 '13 at 11:37
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
    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 '16 at 19:44

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.