List:General Discussion« Previous MessageNext Message »
From:alastair Date:February 21 2002 6:16pm
Subject:Re: Logging problem with --log, my.cnf etc.
View as plain text  
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                   |                               |
alastair@stripped        |                               |
http://www.nucoda.com      |                               |
------------------------------------------------------------
Thread
Logging problem with --log, my.cnf etc.alastair21 Feb
RE: Logging problem with --log, my.cnf etc.Luc Foisy21 Feb
  • Re: Logging problem with --log, my.cnf etc.alastair21 Feb
RE: Logging problem with --log, my.cnf etc.Luc Foisy21 Feb
  • Re: Logging problem with --log, my.cnf etc.alastair21 Feb