Does mysql have permission to write to that location? -----Original Message----- From: alastair [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 10:33 AM To: [EMAIL PROTECTED] Subject: Logging problem with --log, my.cnf etc.
Hello, I am using MySQL 3.23.36 on Linux. This is a small gripe about a product I am otherwise very happy with. I hope I have not missed the obvious or been stupid some other way. The problem - I want to log somewhere other than $DATADIR. Things are set up like ; | log | ON | log_update | OFF | log_bin | OFF | log_slave_updates | OFF I would have liked to use the my.cnf file to achieve this but it doesn't appear to work i.e. a line like (in the [mysqld] section) ; log=/var/log/mysql.log has no effect. Looking at 'mysqld --help' output would show this is set i.e. logfile: /var/log/mysql.log but this file is not created. In fact, logging appears to stop. So, I thought I would try adding the argument to my mysql init script - args that are passed to 'safe_mysqld' i.e. In /etc/init.d/mysql I added ; --log=/var/log/mysql.log to the command line for 'safe_mysqld'. But this too had no effect - no log file created, no logging. So ... I decided to look at 'safe_mysqld'. This is a much more complex program but, seemed to me, to be potentially ignoring a '--log' line i.e. In the 'case' statement near the top ; for arg do case "$arg" in # these get passed explicitly to mysqld --basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--basedir=;;"` ;; --datadir=*) DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"` ;; --pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;; ... There is no catch for '--log', and I assume the catchall default ; *) if test -n "$pick_args" ... misses it as well (or it's ignored later ...). So ... I (probably badly) hacked this script a bit and now I have logging to /var/log/mysql.log. I was looking in some 'changelogs' and found no mention of problems. I also searched the list archives and found one other person with a similar problem which was never resolved ; http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:msp:24135:lkonncgmkabnpiggbdio So, would someone take a look at this and see if they can figure out where the problem lies? I admit it might be me. 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