Usage of MySQL files

Source: Internet
Author: User


Usage of MySQL files log files are located in long_query_time = 2log-slow-queries = log-error = log = C: \ log under the data DIRECTORY by default. the function of the loglog-bin = mysql-bin.index file (binary log index) is to record the absolute paths of all Binary logs, ensuring that various MySQL threads can find all the Binary Log files as needed. Www.2cto.com: 1. the metadata (meta) information related to the table in the ". frm" file is stored in the ". frm" file, including the definition information of the table structure. No matter what storage engine, each table will have a ". frm" file named after the table name. All ". frm" files are stored in the folder of the database. 2. The ". MYD" File ". MYD" is dedicated to the MyISAM storage engine and stores data in the MyISAM table. Each MyISAM table corresponds to a ". MYD" file, which is also stored in the folder of the database to which it belongs and is stored together with the ". frm" file. 3. The ". MYI" File ". MYI" is also dedicated to the MyISAM storage engine and mainly stores the index information of the MyISAM table. For MyISAM storage, the content that can be cached is mainly from the ". MYI" file. Each MyISAM table corresponds to a ". MYI" file, which is stored in the same location as ". frm" and ". MYD.
4. ". ibd files and ibdata files are files that store Innodb data. They are used to store Innodb data (including indexes ), the reason is that the Innodb data storage method can be configured to decide whether to use the shared tablespace to store the stored data or the exclusive tablespace to store the stored data. The exclusive tablespace storage method uses the ". ibd" file to store data, and each table has a ". ibd" file, which is stored in the same location as MyISAM data. If you use a shared storage tablespace to store data, ibdata files are used for storage. One or more ibdata files can be used for all tables. The ibdata file can be configured using two parameters: innodb_data_home_dir and innodb_data_file_path. innodb_data_home_dir configures the directory where data is stored, while innodb_data_file_path configures the name of each file. Of course, you can also disable www.2cto.com.
Innodb_data_home_dir directly uses the absolute path When configuring the innodb_data_file_path parameter. Multiple ibdata files can be configured at a time in innodb_data_file_path. The file size can be specified or automatically expanded, but Innodb limits that only the last ibdata file can be configured as the automatic extension type. When you need to add a new ibdata file, you can only add it at the end of the innodb_data_file_path configuration, and you must restart MySQL to add ibdata. However, if we use exclusive tablespace storage, there will be no such problem, but if we want to use bare devices, one bare device for each table may cause a large number of bare devices, it is not easy to control the size and implementation, but the shared tablespace does not have this problem, so it is easy to control the number of bare devices. I personally prefer to use exclusive tablespace storage. Switch the database engine create table name (field ...... ) ENGINE = InnoDB, if not, go directly to my. in the INI file, change the default-storage-engine line to InnoDB, and restart the database server. Replication1, master.info file: The master.info file is stored in the data directory of the Slave end, which stores information about the Master end of the Slave, including the Master Address, connection user, and connection password of the Master, connection port, current log location, log location that has been read, and other information. Www.2cto.com 2. relay log and relay log indexmysql-relay-bin.xxxxxn files are used to store the Binary Log information read by the Slave I/O thread from the Master, then, the Slave SQL thread reads and parses the corresponding log information from the relay log, converts it to the SQL statement executed by the Master, and then applies it on the Slave end. The functionality of a mysql-relay-bin.index file is similar to that of a mysql-bin.index, and it is also the absolute path where the Log is stored, but it is not a Binary Log, but a Relay Log.
3. relay-log.info file: similar to master.info, it stores information related to the relay log written to the local through the Slave I/O thread. The SQL thread on the Slave side and some management operations can obtain information about the current replication at any time. Pid file conf file socket file by bengda

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.