Marco Study notes 18--mysql advanced Log Management

Source: Internet
Author: User

Error log: Log_error,log_warnings

Information in the server startup and shutdown process

Error message during server run

Event scheduling information that is generated when an event is run

Information generated from the server process when it is started from the server

General query log: General_log,general_log_file,log,log_output={table|file|none}

Slow query Log Long_query_time,log_slow_queries={yes|no},slow_query_log,slow_query_log_file

Binary log: Any operation that causes or may cause changes in the database;
Replication, instant point recovery;
View command: Mysqlbinlog

Binary log format:
Statement based: statement
Row-based: row
Mixing mode: Mixed

Binary Log events:
Time of Generation
Relative position

Binary log files:
Index file
Binary log files

To view the binary log files that are currently in use
mysql> SHOW MASTER STATUS;

mysql> show binary LOGS; (view all current binary log files)

Mysql> SHOW BINLOG EVENTS in ' binary log file name ' [from POS];

mysql> PURGE binary LOGS to ' a binary log file '; (delete binary file) Mysql>flush LOGS; scrolling binary log

Mysqlbinlog

--start-datetime

--stop-datetime

--start-position

--stop-position

Relay LOG: An event that is copied from the binary log file of the primary server and saved as a log file;
Transaction log: Transactional storage engine for atomicity, consistency, isolation, and durability (ACID), converting random io to sequential IO

Innodb_flush_log_at_trx_commit:
0: Synchronize every second, and perform disk flush operation;
1: Synchronize each transaction and perform disk flush operation;
2: Synchronize per transaction, but do not perform disk flush operation;

MyISAM:
Transaction not supported
Table lock
Foreign keys are not supported
B-Tree Index, fulltext Index, spatial index
Support Table Compression
. frm
. MYD
. MYI
InnoDB:
Transaction
Row-level Locks
B-Tree index, clustered index, Adaptive hash Index
Table space, raw disk device;
. frm
. ibd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.