mysql> show variables like "log_error"; +---------------+------------------------------+ | Variable_name | Value | +---------------+------------------------------+ | log_error | /app/log/mysql/error.log | +---------------+------------------------------+ 1 row in set (0.00 sec)
#启用错误日志,缺省情况下文件名为: hostname.err
#下面2种方式均可进行错误日志的配置
--log-error=file_name #命令行选项(command option)
log-error=file_Name #配置文件(configure file)
#查看当前的错误日志配置,缺省情况下位于数据目录
[[email protected] ~]# egrep "log-error" /etc/my.cnf log-error=/app/log/mysql/error.log
时间: 2024-10-10 15:00:30