pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42353: MySQL doesn't generate an error when it can't write to its log file

>Number:         42353
>Category:       pkg
>Synopsis:       MySQL doesn't generate an error when it can't write to its log 
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 20 16:00:01 +0000 2009
>Originator:     Randolf Richardson
>Release:        NetBSD 5.0.1
Inter-Corporate Computer & Network Services, Inc.
#0: Fri Sep 25 14:25:28 PDT 2009

When using the following line in /etc/rc.conf there is no error generated by 
MySQL at startup if it's unable to create/write the specified log file (e.g., 
because it doesn't exist):


It would be really helpful if MySQL generated a fatal error (or at least a 
warning) whenever it can't write to a file.  Either of these options is fine, 
although I personally prefer the "fatal error" approach.

By ignoring this error without generating an alert, I was assuming that the 
logging feature either creates the file as needed, or doesn't work at all, both 
of which turned out to be incorrect assumptions.

Type the following commands (don't use the first command more than once):

echo mysqld_flags=\"--log=/var/log/mysqld.log\" >> /etc/rc.conf
/etc/rc.d/mysqld restart

Create the "/var/log/mysqld.log" file manually (the "touch" command is 
well-suited for this), then grant "w" permission to the "mysql" user (pkgsrc 
creates this user automatically to run the MySQL server daemon).

Home | Main Index | Thread Index | Old Index