WL#233: Refuse start-up if no write perm to err log
Entered by Tom on behalf of Monty. Idea originating from a student of Kaj's at May 01 UK class: From: Michael Widenius Date: Tue, 22 May 2001 04:00:18 +0300 (EEST) To: Timothy Smith Cc: firstname.lastname@example.org, email@example.com, MySQL@polycon.fi Subject: Re: Q: Second set of questions from the first UK MySQL course >>>> 15. Follow up to the problem of the error log pointing to a place >>>> where mysqld lacks write access: Could mysqld under such >>>> circumstances write to an operating system dependent log? >>>> Or would that introduce OS dependent code that should be >>>> avoided at all costs? >>> >>> Permission problems are thoroughly discussed in the manual. > > Timothy> Again, the question isn't addressed. Why not have mysqld use > Timothy> syslog(3) to complain to the console (or whatever) in the case > Timothy> that it can't open the error log? That would be a good feature, > Timothy> and I can't think of a reason not to do it. > > This is something that is trivial to check at startup. Why not just > refuse to start MySQL if we can't write to the log? > (Tim, something for you to add to safe_mysqld...) [ Note added 2011-08-05 by Peter Gulutzan ] For example, after mysqld --log-error=/etc/warning.txt if the user has permission then messages go to /etc/warning.txt, but otherwise messages to to stderr as if --log-error wasn't passed. See the email from Guilhem Bichot in this email thread: http://myforums.oracle.com/jive3/thread.jspa?threadID=830207&tstart=0
Copyright (c) 2000, 2021, Oracle Corporation and/or its affiliates. All rights reserved.