Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views3 pages

Viewing The Error Log

The document provides instructions for viewing the error log in Oracle Cloud Infrastructure using MySQL Shell or MySQL Client. It details commands to access the performance_schema.error_log, filter logs by error type and subsystem, and retrieve counts of specific errors over time. The document also includes examples of log entries and related topics for further reference.

Uploaded by

emmanuelkbr100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Viewing The Error Log

The document provides instructions for viewing the error log in Oracle Cloud Infrastructure using MySQL Shell or MySQL Client. It details commands to access the performance_schema.error_log, filter logs by error type and subsystem, and retrieve counts of specific errors over time. The document also includes examples of log entries and related topics for further reference.

Uploaded by

emmanuelkbr100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Help Center Oracle Cloud Infrastructure Search

Oracle Cloud Infrastructure Documentation


Try Free Tier

Infrastructure Services HeatWave Troubleshooting All Pages

Updated 2023-01-05

Viewing the Error Log


View performance_schema.error_log that contains errors, warnings, and status updates from the
Health Monitor, InnoDB storage engine, RAPID secondary engine, replication channel, and MySQL
Server.

Using a Command-Line Client


Use a command-line client such as MySQL Client or MySQL Shell to view
performance_schema.error_log .

This task requires the following:


A running DB system.

A DB system connected using MySQL Shell, MySQL Client, or any command-line client of
your choice.

Do the following to view performance_schema.error_log using MySQL Shell or MySQL Client:

Note

performance_schema.error_log is available in the SQL execution mode only.

1. Run the following command:


SELECT * FROM performance_schema.error_log;

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');

You can select from the following subsystems:


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:

SELECT HOUR(LOGGED), COUNT(*) FROM error_log WHERE ERROR_CODE = 'MY-010914' AND


LOGGED > DATE_SUB(NOW(),INTERVAL 1 DAY) GROUP BY HOUR(LOGGED);

6. (Optional) To retrieve a count of how many instances of a specific error occurred in a week,
run the following command:

SELECT DAY(LOGGED), COUNT(*) FROM error_log WHERE ERROR_CODE = 'MY-010914' AND


LOGGED > DATE_SUB(NOW(),INTERVAL 1 WEEK) GROUP BY DAY(LOGGED);

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

The error_log Table ↪

MySQL Error Reference ↪

Was this article helpful?

Copyright © 2025, Oracle and/or its affiliates. About Oracle Contact Us Legal Notices Terms of Use & Privacy
Document Conventions Cookie Preferences

You might also like