本文列出了MySQL Server用到的文件类型及其用途.

my.cnf :

MySQL Server主配置文件,可以在MySQL Server主安装目录中找到。Linux下一般在/etc/mysql/my.cnf

.sock :

mysqld creates a socket for programs to connect to and notes in this file. It is named as mysql.sock.

Pid file :

MySQL Server将它的进程ID写到这个文件中,用户可以指定pid文件,否则MySQL 默认写到hostname.pid文件中

.frm :

一个.frm文件代表一个表,它存储了表定义,存放在data目录中。

.MYD :

.MYD文件时MyISAM 表的数据存储文件,它也存放在data目录下。

.MYI :

MyISAM表的索引文件

.ibd :

如果在my.cnf中指定了innodb_file_per_table(一个InnoDB表一个ibd文件), 那么每个Innodb表将分别存储一个.ibd文件中, Innodb表的数据和索引都存储在.ibd文件中,不分别存储。

ibdata1 :

如果my.cnf中没有定义innodb_file_per_table选项,那么所有Innodb的表和数据都将存储在ibdata1文件中。ibdata1表示Innodb共享的tablespace。

ib_logfile0 & ib_logfile1 :

InnoDB log files. The information is logged in circular fashion. InnoDB applies changes recorded in logfiles to tablespace. This is also important for performance and recovery.

.db :

BDB (BerkeleyDB) 存储引擎的data file。同时存储数据和索引。

db.opt :

In CREATE DATABASE command, create_specification options specify database characteristics. Database characteristics are stored in the db.opt file in the database directory.

error log :

This log contains information about mysqld start and stop events, any critical errors that occur while the server is running etc. In my.cnf you can specify log-error[=file_name] option and error log will be created under data directory file_name.err. If no name is specified MySQL will create hostname.err file.

slow query log :

This log contains queries that runs slower than specified long_query_time variable. You can specify log-slow-queries[=file_name] option. If no file name specified, MySQL will log slow queries in host_name-slow.log file under data directory.

general query log :

This file logs all the SQL sent from client about MySQL server and mysqld start up/down details. You may enable it by log[=file_name]. If file_name is not specified MySQL will create hostname.log under data directory.

临时文件#sql-55c_6.MYD / #sql-55c_6.frm / #sql-55c_6.MYI :

当用户运行ALTER TABLE 时,通常会创建临时文件。执行Alter Table语句时,MySQL先创建表的备份,然后在上面修改,删除原始数据,完成Alter后将临时文件重命名为原来的名字。临时文件的名字格式通常是 #sql-…/MYD/MYI/frm.

binary log files :

These files contains events that describe database changes such as table creation operations or changes to table data. You may specify their name by –log-bin[=base_name] option. Default name is value of pid-file option (defaults to hostname of server).

relay log files :

These files contains events read from the binary log of the master and written by the slave I/O thread. Events in the relay log are executed on the slave as part of the SQL thread.

master.info :

This file contains the status and current configuration information for the slave’s connectivity to the master.

relay-log.info :

This file holds the status information about the execution point within the slave’s relay log.

.index :

To keep track of which binary log files have been used, mysqld creates a binary log index file. It contains the names of all used binary log files. You may change it by –log-bin-index[=file_name] option otherwise basename will be same as that of binary log file with default extension “.index”.

In case of replication, relay logs uses .index files for same purpose. The default relay log index file name is host_name-relay-bin.index in the data directory. You may change the name by –relay-log-index option.

.TMD:

This is an intermediate data file for a table that needs to recreate its data file. You can find this files normally during REPAIR TABLE operations.

TRG & TRN Files:

Trigger definitions are stored in plain text files in the directory that contains the schema objects.

The file tablename.TRN is the TRIGGERNAME file stored under database directory.

The file tablename.TRG is the TRIGGERS file. It represents all the table triggers attached to a given table, so this file can contain triggers for multiple events (BEFORE/AFTER, INSERT/UPDATE/DELETE).

.ARZ, .ARM & .ARN files:

These are files related to Archieve Storage Engine.

.ARZ is data files holds data for table, .ARM holds metadata while during table optimization process a .ARN file may appear.

mysql trg文件_MySQL - 文件类型及其用途相关推荐

  1. mysql innodb文件_MySQL文件和Innodb引擎文件

    构成MySQL数据库和InnoDB存储引擎表的各种类型文件,组要有以下文件 参数文件:告诉MySQL实例启动时在哪里可以找到,数据库文件,并且指定某些初始化参数,这些参数定义了某种内存结构的大小等设置 ...

  2. mysql与文件_MySQL——文件

    构成MySQL数据库的各种类型文件,包括:参数文件 日志文件 socket文件(套接字方式连接时需要) pid文件(mysql实例进程id) MySQL表结构文件 存储引擎文件(每个存储引擎自己用来保 ...

  3. mysql字段说明_mysql 字段类型说明

    MySQL支持大量的列类型,它可以被分为3类:数字类型.日期和时间类型以及字符串(字符)类型.本节首先给出可用类型的一个概述,并且总结每个列类型的存储需求,然后提供每个类中的类型性质的更详细的描述.概 ...

  4. mysql数据恢复工具_mysql文件恢复软件|Mysql数据库修复工具(Recovery for MySQL)下载 V2.7.22255.1 官方版 - 比克尔下载...

    Recovery for MySQL是一款Mysql数据库修复工具,也可以用来恢复mysql文件,支持3.x.4.x.5.x等多个版本,支持myd和myi文件,它可以将检索到的数据保存至SQL脚本中, ...

  5. mysql 创建函数_MySQL文件及目录权限设置分析-爱可生

    1 背景 创建文件及目录时,我们会对相关的权限有一定的要求,默认的可以通过系统的umask来控制.然而,在我们使用MySQL时,无论是开始使用前的初始化,还是MySQL实例启动后,创建的相关文件及目录 ...

  6. mysql索引技术_MySQL索引类型

    首先请查看不同引擎支持的索引类型:存储引擎简介 . 聚集索引和非聚集索引概念见:聚集索引与非聚集索引 和 聚集索引 . 覆盖索引见:覆盖索引 . 1. InnoDB的每一个表都会有一个聚集索引(第一索 ...

  7. mysql索引总结_mysql 索引类型以及创建

    文章归属:http://feiyan.info/16.html  自己还是小白,从借鉴别人的东西开始学习. 关于MySQL索引的好处,如果正确合理设计并且使用索引的MySQL是一辆兰博基尼的话,那么没 ...

  8. mysql 单选字段_mysql字段类型

    学习自 https://www.cnblogs.com/jennyyin/p/7895010.html,感谢原博主的奉献 mysql支持多种类型,大致可以分为三类:数值.字符串.日期/时间. 数值类型 ...

  9. mysql 字段字节_MySql字段类型及字节

    字段类型: TINYINT-----------------一个很小的整数.有符号的范围是-128到127,无符号的范围是0到255. SMALLINT--------------一个小整数.有符号的 ...

最新文章

  1. struts2 iterator list中对象的list 双层迭代
  2. python在线教学-微软推出 Python 免费在线教程视频
  3. zabbix items 配置
  4. IP phone配製學習
  5. 复合类型_没有学不会的python--复合类型(1)--概念和元组
  6. MySQL连接查询—笛卡尔乘积
  7. 关闭Eureka的服务自我保护
  8. CentOS6.4之Linux软件包管理
  9. java的tcp实时接收json格式报文_tcp - 如何使用带有rsocket Java的TcpClientTransport将自定义数据格式转换为JSON - 堆栈内存溢出...
  10. OllyDBG 入门系列(三)-函数
  11. 版本控制工具--svn和git的使用(一) -----版本控制的好处以及分类
  12. mysql判断不为null
  13. OSError: [WinError 126] 找不到指定的模块。【专治疑难杂症】
  14. 屏幕录像大师如何把LXE文件转换为EXE文件
  15. Google Daydream实验室:VR设计的三大要素
  16. 可以用计算机控制手机的软件,还有这样的神奇软件!让你用PC操控手机的神器...
  17. 无盘 电影服务器,网吧电影服务器解决方案完全攻略指南
  18. HackingLab 脚本关
  19. android通知栏显示,通知栏点击事件监听
  20. IOS开发 当滑动tabelview时,使键盘滑落

热门文章

  1. Cg Programming/Unity/Reflecting Surfaces反射表面
  2. 泰森多边形算法 java_基于java的泰森多边形算法
  3. 秒速5 厘米经典台词
  4. python mathjax_Python3 调用 Node.js 解析 MathJax 公式
  5. 【CSS】颜色码对照表
  6. 个人信息遭泄露 电信诈骗网络信息管理存隐忧
  7. 腾讯ConTech,是内容困局的一剂良药吗?
  8. 【openGauss/MogDB的uncommitted xmin问题解决】
  9. CocoaPods介绍及基本使用
  10. 码绘与手绘的比较【动态篇】