[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
>Synopsis: MySQL doesn't generate an error when it can't write to its log
>Arrival-Date: Fri Nov 20 16:00:01 +0000 2009
>Originator: Randolf Richardson
>Release: NetBSD 5.0.1
Inter-Corporate Computer & Network Services, Inc.
NetBSD netbsd.unix.lumbercartel.ca 5.0.1 NetBSD 5.0.1 (LUMBERCARTEL_GENERIC)
#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
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).
Main Index |
Thread Index |