Bug #40263 Server default log filenames do not use hostname

Submitted: 22 Oct 2008 18:41 Modified: 22 Oct 2008 18:47
Reporter: Paul DuBois Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0+ OS:Any
Assigned to: CPU Architecture:Any

[22 Oct 2008 18:41] Paul DuBois
Description:
The manual states (and has stated since, oh, forever) that the default names for its log files are based on the server hostname.  Examples:

http://dev.mysql.com/doc/refman/5.0/en/query-log.html:
If no file_name value is given for --log or -l, the default name is host_name.log in the data directory.

http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html:
If no file_name value is given for --log-slow-queries, the default name is host_name-slow.log.

However, the default name actually seems to be based on the pid-file value.

How to repeat:
Start the server with these options:

[mysqld]
log
log-slow-queries
pid-file=mypidfile.pid

The resulting general query log and slow query log files are mypidfile.log and mypidfile-slow.log.

Suggested fix:
I'm not sure. This could be a server bug, or a docs bug. The latter is a possibility because the default for the binary log *is* said to be based on the pid-file value:

http://dev.mysql.com/doc/refman/5.0/en/binary-log.html:
If no base_name value is given, the default name is the value of the pid-file option (which by default is the name of host machine) followed by -bin.

That seems pretty weird to me, but the manual says what it says. (It seems weird to me because basing defaults on the pid-file value can lead to odd default names for log files, as my example shows.)

I can see two possible fixes:

* Fix the server to really use the hostname for default log filenames. (I'd suggest doing this for the binary log, too, for consistency.)

* Fix the manual to say that the default general and slow query log filenames are based on the pid-file value.
[22 Oct 2008 18:47] Giuseppe Maxia
Duplicate of Bug#33693 "general log name and location depend on PID file, not on predefined values"

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.