maybe the variable you are using is not right
my 'show variables' indicates log with a value of OFF | log | OFF yet mysql still generates its standard error file even though this is not a standard variable, it is the variable used in safe_mysqld, perhaps you could add this to my.cnf [safe_mysqld] err_log=/var/log/mysql.log as indicated in safe_mysqld # safe_mysqld-specific options - must be set in my.cnf ([safe_mysqld])! --ledir=*) ledir=`echo "$arg" | sed -e "s;--ledir=;;"` ;; --err-log=*) err_log=`echo "$arg" | sed -e "s;--err-log=;;"` ;; or you could change this line in safe_mysqld test -z "$err_log" && err_log=$DATADIR/`/bin/hostname`.err to test -z "$err_log" && err_log=/var/log/`/bin/hostname`.err -----Original Message----- From: alastair [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 1:17 PM To: [EMAIL PROTECTED] Subject: Re: Logging problem with --log, my.cnf etc. On Thu, Feb 21, 2002 at 01:02:02PM -0500, Luc Foisy wrote: > Does mysql have permission to write to that location? Yes. I'm starting and stopping MySQL using an init script a la Redhat. This calls 'safe_mysqld' with some args (e.g. --user,--pid-file etc.) - all started as user root as usual. The problem is that I could not see the '--log' file getting recognised or used in safe_mysqld. As I said, I would much rather be using /etc/my.cnf with the log= syntax. What I did in 'safe_mysqld' was ; 1) Add --log=/var/log/mysql.log to the call to safe_mysqld in my mysql init script 2) Add --log=*) log=`echo "$arg" | sed -e "s;--log=;;"` ;; to the 'case' statement at the top. 3) After the USER_OPTION="" block further down I added ; LOG_OPTION="--log=$log" touch $log; chown $user $log 4) Added $LOG_OPTION to the actual call to $MYSQLD (x2) near the bottom. This is a production machine I am playing with here at work so I am limited in what I can screw around with. I need to re-test this stuff at home again. But - has anyone managed to change MySQL's log file using my.cnf and the log= syntax? Cheers, -- Alastair | | [EMAIL PROTECTED] | | http://www.nucoda.com | | ------------------------------------------------------------ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php