This article is a mirror article of machine translation, please click here to jump to the original article.

View: 25823|Reply: 2

[Source] MySQL enables logging of queried/executed SQL statements

[Copy link]
Posted on 6/30/2021 11:12:26 AM | | | |
As a back-end developer, when encountering database problems, you should follow up on the problem by analyzing SQL statements, which can record all queried/executed SQL statements to log files.

There are several methods, but I personally think the following is the easiest, but you need to reconfigure the MySQL service after restarting.

Check whether the log function is enabled



general_log: Whether the log function is turned on or off by default

general_log_file: Where the log file is saved

Open the log


Query whether it is turned on








Previous:Many posts are code that cannot be viewed?
Next:About the maximum number of rows and columns in the csv file
 Landlord| Posted on 6/30/2021 11:14:47 AM |
MySQL enables generic query logs and slow query logs
https://www.itsvse.com/thread-7287-1-1.html

MySQL enables slow query logging
https://www.itsvse.com/thread-254-1-1.html
Posted on 7/5/2021 5:18:33 PM |
Code not viewable?
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com