Error log
Log_error
Log_warning
General Query Log
General_log
General_log_file
Log
Log_output
Slow query log
Long_query_time
Log_slow_queries={yes|no}
Slow_query_log |off
Slow_query_log_file |/mydata/data/localhost-slow.log
Set global slow_query_log=1;
Binary logs: Operations that can cause changes to the database are recorded
Replication, point-in-time recovery:
Mysqlbinlog Viewing binary log commands
--start-datetime Specify start time and end event to view
--stop-datetime
--start-position the specified position for display
--stop-position
#mysqlbinlog--start-datetime= ' 2016-09-10 15:10:10 ' mysql-bin.00005
#mysqlbinlog--start-position=107
#mysqlbinlog mysql-bin.00005
Format of binary Log
Statement-based statement
Based on Row row
Mixed Mode Mixed
mysql> flush logs; manual scrolling log
Mysql> purge binary logs to ' mysql-bin.00003 '; Manually delete all files before specifying a binary file
Mysql> show binary logs; View binary files that are currently owned
Cd/mydata/data
Cat Mysql-bin.index View all binary files
Mysql> Show Master Status View binary files currently in use
Mysql> show Binlog events in ' mysql-bin.0005 '; View the information recorded in a binary file
Mysql> show Binlog events in ' mysql-bin.0005 ' from 107; indicate from which location to start the display
Replay
Relay Log
Transaction log ACID, which converts random io to sequential io;
Show global variables '%log% '; Display information related to log
Show global variables '%long% '; Displays the length of the defined time, or slow query if it exceeds this length
This article from "Operation and maintenance Growth Road" blog, declined reprint!
MySQL Log management