mysql under windows, modify my.ini, open log
The path of my.ini: C:\ProgramData\MySQL\MySQL Server 8.0
Find the following location:
# General and Slow logging.
#Log output to file
log-output=FILE
#Automatically generate log 1--automatically generate 0--not automatically generate
general-log=1
#File output path (default computer name) general_log_file="DESKTOP-L7V2NIC.log"
#Whether to open slow query (the execution time of sql statement is relatively long). 1--open 0--do not open
slow-query-log=1
#Slow query log output path (default computer name) slow_query_log_file="DESKTOP-L7V2NIC-slow.log"
#Slow query time, in seconds. The following means that the query time exceeds 10 seconds and is recorded.
long_query_time=10