The mysql log command has the following types of logs:-log-err query log:-log slow query log:-log-slow-queries Update log: -log-update BINARY log:-log-bin in the mysql installation directory, open my. ini, add the above parameters to the end, save and restart the mysql service. Example: # Enter a name for the binary log. otherwise a default name will be used. # log-bin = # Enter a name for the query log file. otherwise a default name will be used. # log = # Enter a name for the error log file. otherwise a default name will be used. log-error = # Enter a name for the update log file. otherwise a default name will be used. # log-update = only error logs are enabled. To enable other logs, remove the preceding "#" command: ① show variables like 'Log _ % '; view All log commands ② show variables like 'Log _ bin'; view specific log commands