MySQL Error number: 4002; Symbol: ER_DA_ERROR_LOG_TABLE_DISABLED; SQLSTATE: HY000 报错 故障修复 远程处理

文档解释

Error number: 4002; Symbol: ER_DA_ERROR_LOG_TABLE_DISABLED; SQLSTATE: HY000

Message: None of the log-sinks selected in @@global.log_error_services supports writing to the performance schema. The server will not be able to make the current runs’ error events available in performance_schema.error_log. To change this, add a log-sink that supports the performance schema to @@global.log_error_services.

错误说明:

ER_DA_ERROR_LOG_TABLE_DISABLED错误代码为4002,MySQL服务器会在发生错误时将错误消息记录在error log表中,该错误表示已禁用error log表以阻止记录错误消息。

常见案例

出现ER_DA_ERROR_LOG_TABLE_DISABLED错误消息的情况,有以下几种:

1.在MySQL配置文件中没有启用错误日志相关选项;

2.在MySQL服务器中已经启动了错误日志功能,但是没有正确创建error log表;

3.MySQL服务器中已经有error log表,但是tyle属性被设置成”disabled”,从而禁用表,不允许记录消息。

解决方法:

1.调整MySQL配置文件,启用错误日志功能;

2.启用error log表,设置type属性值为“Enabled”,以允许向error log表添加记录;

3.如果不需要日志记录,在MySQL配置文件中禁用error log功能;

4.如果error log表仍然启用,设置type属性值为“Disabled”,以阻止向error log表添加记录。


数据运维技术 » MySQL Error number: 4002; Symbol: ER_DA_ERROR_LOG_TABLE_DISABLED; SQLSTATE: HY000 报错 故障修复 远程处理