Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method to view the mysql error log

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "what is the method of viewing mysql error log". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

View the mysql error log: 1, use the "SHOW VARIABLES LIKE 'log_error'" command to get the path of the error log file; 2, find the error log file with the suffix ".err" according to the path obtained, and open the file through notepad to view the information in the file.

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

Error log (Error Log) is one of the most commonly used logs in MySQL, which mainly records the information in the process of starting and stopping the MySQL server, the failures and anomalies occurred during the operation of the server, and so on.

Mysql View error Log

The error log records the time when the MySQL service was turned on and off, as well as what exceptions occurred during the operation of the service. If there is an exception in the MySQL service, you can find the cause in the error log.

In MySQL, you can view the directory and file name information where the error log file is located through the SHOW command.

Mysql > SHOW VARIABLES LIKE 'log_error' +-+ | Variable_name | Value | + -+-- + | log_error | C:\ ProgramData\ MySQL\ MySQL Server 5.7\ Data\ LAPTOP-UHQ6V8KP.err | +-+ -+ 1 row in set 1 warning (0.04 sec)

The error log is stored as a text file and can be viewed directly using the plain text tool. This is opened through notepad, from which you can know the file name of the error log. The file opens the LAPTOP-UHQ6V8KP.err file under the default data path "C:\ ProgramData\ MySQL\ MySQL Server 5.7\ Data\". Some of the contents are as follows:

190906 22:06:45 InnoDB: Completed initialization of buffer pool190906 22:06:45 InnoDB: highest supported file format is Barracuda.190906 22:06:45 InnoDB: Waiting for the background threads to start190906 22:06:46 InnoDB: 5.7.29 started; log sequence number 1605345190906 22:06:47 [Note] Server hostname (bind-address): '0.0.0.0The port: 3306190906 22:06:47 [Note] -' 0.0.0.0' resolves to '0.0.0.0' 190906 22:06:47 [Note] Server socket created on IP: '0.0.0.0room.190906 22:06:47 [Note] Event Scheduler: Loaded 0 events190906 22:06:47 [Note] / usr/sbin/mysqld: ready for connections.Version:' 5.7.29murlog' socket:'/ var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)

The above is part of the error log file, which mainly records some running errors of the system.

This is the end of the content of "what is the way to view the mysql error log". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report