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

Reply via email to