Bug #45359 binary and relay log file names depend on PID file name
Submitted: 7 Jun 2009 13:17 Modified: 13 Dec 2012 16:40
Reporter: Magne Mæhre Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.0.45,5.1.23,6.0 OS:Any
Assigned to: CPU Architecture:Any

[7 Jun 2009 13:17] Magne Mæhre
The default binary log .NNNNNN and .index files are created in the data directory using the PID file basename. (The same might be true of the relay log file).

According to the documentation, the default names should be based on the hostname.

See Bug# 33693  for a similar case

How to repeat:
Set the pid-file variable explicitly, and have an empty log_bin

pid-file = /var/run/mysqld/mysqld.pid
log_bin =

results in the log_bin being set to   ./mysqld-bin
when it should have been ./<hostname>-bin
[8 Jun 2009 19:50] Paul DuBois
I checked whether this issue does in fact apply to the relay log .NNNNNN and .index files, and it does.
[23 Oct 2009 6:27] Eric Bergen
This used to depend on the hostname of the machine. In 5.0.38 (I think) it was changed to depend on the pid file. Why does this need to depend on anything? I think it should be like the relay-log.info and master.info files in that the default name is just a fixed string.
[13 Dec 2012 16:40] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

[13 Dec 2012 16:41] Jon Stephens
Fixed in trunk, tagged 5.7.1. 
Documented fix as follows in the 5.7.1 changelog:

        The binary log and relay log files used the name of the PID file
        instead of the host name as the base name.