MySQL relay logs are saved in volatile filesystem /var/run

Bug #119271 reported by David Leadbeater
Affects Status Importance Assigned to Milestone
MySQL Server
mysql-dfsg-5.0 (Ubuntu)

Bug Description

Binary package hint: mysql-server-5.0

When using replication the MySQL relay logs are saved under /var/run, as this is a tmpfs filesystem it can fill up and replication will stop working (also I think this might affect recovery in the case of a system crash).

A default like:
in the my.cnf file would be good.

Soren Hansen (soren)
Changed in mysql-dfsg-5.0:
status: Unconfirmed → Needs Info
Revision history for this message
Soren Hansen (soren) wrote :

Sorry, my comment got lost somehow.

My mysql server already puts it under /var/lib/mysql. Could you check what your datadir is set to? ("mysqladmin variables" reveals it)

Revision history for this message
wayne (wayne-flashmedia) wrote :

Heres a me too comment, I have the same problem on two servers.

To answer the question my datadir is /var/lib/mysql.

Revision history for this message
wayne (wayne-flashmedia) wrote :

Heres a bug I found on Mysql's site. The version numbers not the same but the symptoms are.

Revision history for this message
David Leadbeater (launchpad-net-dgl) wrote :

Yes, that looks like the problem. The MySQL docs don't match the behavior of the server.

This also affects log-bin, but this is specified in the my.cnf shipped by Ubuntu so the issue isn't seen.

(Just a note for anyone else experiencing this: if you do update the config file you need to also move the files and you need to update the locations in /var/lib/mysql/ and (the newly copied) /var/log/mysql/mysqld-relay-bin.index, they are just text files.)

Mathias Gug (mathiaz)
Changed in mysql-dfsg-5.0:
importance: Undecided → Medium
status: Incomplete → Triaged
Changed in mysql:
status: New → Confirmed
Revision history for this message
Ante Karamatić (ivoks) wrote :

This is major bug. MySQL replication is useless, even with datadir set to /var/lib/mysql, in Feisty.

I can solve this only with setting pid-file to /var/lib/mysql/ :/

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-dfsg-5.0 - 5.0.51a-3ubuntu5

mysql-dfsg-5.0 (5.0.51a-3ubuntu5) hardy; urgency=low

  * debian/patches/59-fix-mysql-replication-logs.dpatch:
    Fix mysql replication: relay-logs were stored in /var/run. (LP: #119271).
    Patch taken from 5.0.54.
  * debian/patches/58-disable-ndb-backup-print.dpatch:
    update description of ndb_backup_print patch.

 -- Mathias Gug <email address hidden> Thu, 27 Mar 2008 19:02:38 -0400

Changed in mysql-dfsg-5.0:
status: Triaged → Fix Released
Revision history for this message
Arjen Lentz (arjen-lentz) wrote :

See for more background info and a workaround through the my.cnf.

Monty Taylor (mordred)
Changed in mysql-server:
importance: Undecided → Unknown
status: Confirmed → Unknown
Revision history for this message
Jeremy Jackson (jerj) wrote :

The *fix* released breaks an existing replication setup when going from Gutsy to Hardy. I had to manually move the relay logs from /var/run/mysqld to /var/lib/mysql, and edit and mysqld-relay-bin.index. But it did work, and saved me re-syncing the whole db.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.