Home > Database > Mysql Tutorial > Where is the mysql error log?

Where is the mysql error log?

青灯夜游
Release: 2022-01-05 17:00:57
Original
12302 people have browsed it

Mysql error log is generally in the data directory under the installation directory. It is a file with the extension ".err". The search method: 1. Log in to mysql; 2. Execute the "SHOW VARIABLES LIKE 'log_error'" command You can get the path of the error log file.

Where is the mysql error log?

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

The Error Log is the most commonly used log in MySQL. It mainly records information during the startup and stop process of the MySQL server, failures and exceptions that occur during the operation of the server, etc.

Mysql error log location

Under windows, the error log file is generally in the data directory under the installation directory. The file extension is .err. You can also open the my.ini file in the installation directory to check it.

How to find the error log (get the path)

1. Log in to mysql

Connect to the MySQL database server

C:\Users\Administrator>mysql -u root -p
Copy after login

2 . You can view the directory and file name information of the error log file 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)
Copy after login

It can be seen that the installation path of my mysql is "C:\ProgramData\MySQL\MySQL Server 5.7\", so the error log file is in "C:\ProgramData\MySQL\MySQL Server 5.7\Data \"Down.

[Related recommendations: mysql video tutorial]

The above is the detailed content of Where is the mysql error log?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template