MySQL Variables log_error 数据库 参数变量解释及正确配置使用
本站中文解释
log_error用于指定错误日志文件的路径,默认从MySQL 8.0版本开始,错误日志文件的文件名为error.log。
该参数是一个字符串型。可以使用以下语法设置log_error变量:
SET GLOBAL log_error = ;
设置完成之后,可以使用以下语法检查设置结果:
SHOW GLOBAL VARIABLES LIKE ‘log_error’;
也可以在my.cnf或者my.ini文件中设置log_error参数,示例如下:
log_error =
重启MySQL服务使设置生效。
官方英文解释
log_error
| Command-Line Format | --log-error[=file_name] |
|---|---|
| System Variable | log_error |
| Scope | Global |
| Dynamic | No |
| Type | File name |
The error log output destination. If the destination is the
console, the value is stderr. Otherwise,
the destination is a file and the
log_error value is the file
name. See Section 5.4.2, “The Error Log”.