Mysql log command bitsCN.com
Mysql log command
Mysql has the following types of logs:
Error log:-log-err
Query log:-log
Slow query log:-log-slow-queries
Update log:-log-update
Binary log:-log-bin
In the installation directory of mysql, open my. ini, add the above parameters to the end, save and restart the mysql service.
For 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 "#".
View the command:
① Show variables like 'log _ % '; view all log commands
② Show variables like 'log _ bin'; view specific log commands
BitsCN.com