Monday, July 10, 2006

err-log or log-error

Today I was investigating why one of the MySQL server wasn't logging anything in the error log. By default the error logs are written in the data directory with a .err extension.

The "err-log" configuration option only works with safe_mysqld. If you try to specify this option in the configuration file under [mysqld] then the following error is generated.

[ERROR] /path/to/mysqld: unknown variable 'err-log=/path/to/error_log'


When this option is used, MySQL server doesn't report the error log file path for the "log_error" variable in the output of "SHOW VARIABLES"

To specify the error log file so that it will show up in SHOW VARIABLES, we need to use the "log-error" option.

1 comment:

Anonymous said...

hi...
i tried to enable bin and general query log file in mysql.
i gave the statement
log-bin=/var/sss/ssbin.log
log=/var/sss/sserr.log
in my.cnf under mysqld_safe
then i stop and start the mysq.
and execute some queries in mysql,
but the log files were not created.