MySQL Learning (a) file

Source: Internet
Author: User
Tags to domain

1. parameter file

2. log files

Error log file Xxx.err file (xxx typically represents host name)

Slow query log file 1). Typically, you set a threshold to log SQL statements that exceed the value of the execution time to the slow query log

You need to set the Long_query_time parameter (in microseconds after 5.1), switch to Log_slow_queries

2) If the SQL statement does not go through the index, it can also be logged to the slow query log

Switch for log_queries_not_using_indexes

Analysis Instructions: Mysqldumpslow

5.1 version can be placed in the Mysql.show_log table (need to switch log_output)

The query log xxx.log file---Records all request information for DB, which can be placed in the General_log table

The binary log records all operations that make changes to the database, primarily for recovery + replication (replication, in fact, real-time synchronization)

Switch to Log-bin[=name]

The table storage engine that uses things, uncommitted binary logs are first written to the cache, and directly to the binary file when committed, default size (binlog_cache_size)

Each session of the cache has one, Binlog_cache_use record the number of times to use buffer write log, Sync_binlog set how many times to write the disk (change to 1 is synchronous write disk, 0 means no OS buffer)

Master-->slave-->slave need to configure Log-slave-update to fetch binary logs from Master from slave

Binlog_format parameter (value statement| row| MIXED)

3.socket files related to domain sockets for UNIX systems/tmp/mysql.sock

4. pid file Xxx.pid isntance Start will write the process number

5. Table structure definition file frm

6.innodb storage Engine files----different storage engines (it seems like many Oracle copies)

1) tablespace file default ibdata1 (Datadir,innodb_data_file_path can discover its path; innodb_file_per_table separate table space for each table for storing data, indexes, Insert buffer etc)

2) Redo log file default Ib_logfile0 + Ib_logfile1 Group concept (same as Oracle)

The difference between the redo log file and the binary log is that the redo log file records the case of each page change (only the InnoDB is recorded here, the other engine regardless), write redo log buffer first

Binary record before a thing is submitted

Related Article

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.