Viewing The Error Log
Viewing The Error Log
Updated 2023-01-05
A DB system connected using MySQL Shell, MySQL Client, or any command-line client of
your choice.
Note
2. (Optional) To filter the logs to show only errors, run the following command:
SELECT * FROM performance_schema.error_log WHERE PRIO='error';
3. (Optional) To filter the logs to only show errors from the HEALTH subsystem, run the
following command:
SELECT * FROM performance_schema.error_log WHERE SUBSYSTEM IN
('HEALTH');
InnoDB
RAPID
Repl
Server
4. (Optional) To filter on the HEALTH subsystem over a 2 hour time interval, run the following
command:
SELECT * FROM performance_schema.error_log WHERE SUBSYSTEM = 'HEALTH' AND
LOGGED > DATE_SUB(NOW(),INTERVAL 2 HOUR);
5. (Optional) To retrieve a count of how many instances of a specific error occurred in a single
day, run the following command:
6. (Optional) To retrieve a count of how many instances of a specific error occurred in a week,
run the following command:
Without using any filters, you get a response similar to the following, which displays the time the
event occurred, the thread ID, priority, error code (if present), subsystem, and text describing the
event:
*************************** 1. row ***************************
LOGGED: 2021-05-10 17:09:31.132868
THREAD_ID: 0
PRIO: Note
ERROR_CODE: MY-010096
SUBSYSTEM: Server
DATA: Ignoring --secure-file-priv value as server is running with --initialize(-ins
*************************** 2. row ***************************
LOGGED: 2021-05-10 17:09:31.137469
THREAD_ID: 0
PRIO: Note
ERROR_CODE: MY-010949
SUBSYSTEM: Server
DATA: Basedir set to /usr/.
*************************** 3. row ***************************
LOGGED: 2021-05-10 17:09:31.141389
THREAD_ID: 0
PRIO: System
ERROR_CODE: MY-013169
SUBSYSTEM: Server
DATA: /usr/sbin/mysqld (mysqld 8.0.24-u1-cloud) initializing of server in progress
*************************** 4. row ***************************
LOGGED: 2021-05-10 17:09:31.192341
THREAD_ID: 0
PRIO: Note
ERROR_CODE: MY-010458
SUBSYSTEM: Server
DATA: --initialize specified on an existing data directory.
*************************** 5. row ***************************
..............................
..............................
Related Topics
Copyright © 2025, Oracle and/or its affiliates. About Oracle Contact Us Legal Notices Terms of Use & Privacy
Document Conventions Cookie Preferences