Table of Contents
MySQL技术内幕-InnoDB存储引擎-读书笔记(二)
第三章 文件
mysql与innodb几个类型的文件
参数文件
日志文件" >日志文件
其他" >其他
innodb存储引擎文件" >innodb存储引擎文件
重做日志文件" >重做日志文件
Home Database Mysql Tutorial MySQL技术内幕-InnoDB存储引擎-读书笔记(二)_MySQL

MySQL技术内幕-InnoDB存储引擎-读书笔记(二)_MySQL

Jun 01, 2016 pm 12:59 PM
engine notes

MySQL技术内幕-InnoDB存储引擎-读书笔记(二)

作为php开发,使用mysql总是少不了的

mysql
系列文章博客链接 http://itsong.net/articles/466.html

第三章 文件

mysql与innodb几个类型的文件

参数文件,配置路径、初始化参数、内存大小等 日志文件,包括错误日志,二进制日志,慢查询日志,查询日志 socket文件,用unix域套接字,unix domain socket来进行连接时需要的文件,这一般是本机连接,比通常tcp快 pid文件,进程id文件 表结构文件,存放表结构定义的文件 存储引擎文件,每个存储引擎自己搞文件保存数据,包括数据和索引等。
*

参数文件

musql --help | grep my.cnf可以寻找加载哪些参数文件 静态参数,整个实例生命周期不得更改,类似只读。 动态参数,可以通过set命令进行更改
<code class="hljs sql">SET
| [global | session] system_var_name = expr
| [@@global. | @@session. | @@]system_var_name = expr</code>
Copy after login
global与session表示该参数的修改基于当前会话还是整个实例的生命周期。

日志文件

错误日志,show variables like 'log_error'定位错误日志,默认情况下,文件名为服务器主机名.err 慢查询日志,阈值通过 long_query_time 修改,默认值10秒(含义是大于10,不包括10),默认不启动慢查询日志,要将 log_slow_queries 设为ON,mysqldumpslow可以解决日志过多难以解决的问题 从5.1开始,慢查询可以以微秒记录。并且慢查询会进表,叫mysql.slow_log,通过log_output(FILE | TABLE)指定 log_queries_not_using_indexes,记录没有使用索引的慢查询日志文件 查询日志,默认文件名为主机名.log,也可以进表,general_log 二进制日志,记录对数据库执行更改的所有操作,不包括SELECT和SHOW这类操作。包括操作时间和执行时间等信息。主要用来恢复、复制(master,slave实时同步) 二进制日志所在目录show variables like 'datadir',默认文件名为主机名,后缀为序列号,bin_log.index为二进制的索引文件,存储日志序号 默认二进制日志未开启,开启binlog性能下降1%,但是可以接受的 查看binlog要使用mysqlbinlog,binlog还有很多操作,不过这里我不太关心啦

其他

套接字文件,一般再/tmp下,mysql.sock pid文件,主机名.pid,variables 为 pid_file 表结构定义文件,frm后缀名的文件,记录的表结构定义以及视图定义,文本文件,可以直接cat

innodb存储引擎文件

存储的数据按表空间进行存放,默认会有一个初始化大小为10MB,名为ibdata1的文件,默认表空间。 设置innodb_data_file_path参数后,innodb存储引擎的表的数据都会记录到该文件内。 设置innodb_file_per_table,每个基于innodb存储引擎的表单独产生一个表空间,文件名为表名.ibd,就不会进入默认表空间。 这些单独的表空间文件仅存储该表的数据,索引和插入缓冲等信息,其余信息还是存放在默认的表空间。

重做日志文件

ib_logfile0和ib_logfile1,记录了innodb存储引擎的事务日志 每个文件写到文件最后时,切换至另一个日志文件去写,为了得到更高的可靠性,可以设置多个镜像日志组

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to delete Xiaohongshu notes How to delete Xiaohongshu notes Mar 21, 2024 pm 08:12 PM

How to delete Xiaohongshu notes? Notes can be edited in the Xiaohongshu APP. Most users don’t know how to delete Xiaohongshu notes. Next, the editor brings users pictures and texts on how to delete Xiaohongshu notes. Tutorial, interested users come and take a look! Xiaohongshu usage tutorial How to delete Xiaohongshu notes 1. First open the Xiaohongshu APP and enter the main page, select [Me] in the lower right corner to enter the special area; 2. Then in the My area, click on the note page shown in the picture below , select the note you want to delete; 3. Enter the note page, click [three dots] in the upper right corner; 4. Finally, the function bar will expand at the bottom, click [Delete] to complete.

Can deleted notes on Xiaohongshu be recovered? Can deleted notes on Xiaohongshu be recovered? Oct 31, 2023 pm 05:36 PM

Notes deleted from Xiaohongshu cannot be recovered. As a knowledge sharing and shopping platform, Xiaohongshu provides users with the function of recording notes and collecting useful information. According to Xiaohongshu’s official statement, deleted notes cannot be recovered. The Xiaohongshu platform does not provide a dedicated note recovery function. This means that once a note is deleted in Xiaohongshu, whether it is accidentally deleted or for other reasons, it is generally impossible to retrieve the deleted content from the platform. If you encounter special circumstances, you can try to contact Xiaohongshu’s customer service team to see if they can help solve the problem.

What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? Mar 21, 2024 pm 09:30 PM

As a Xiaohongshu user, we have all encountered the situation where published notes suddenly disappeared, which is undoubtedly confusing and worrying. In this case, what should we do? This article will focus on the topic of &quot;What to do if the notes published by Xiaohongshu are missing&quot; and give you a detailed answer. 1. What should I do if the notes published by Xiaohongshu are missing? First, don't panic. If you find that your notes are missing, staying calm is key and don't panic. This may be caused by platform system failure or operational errors. Checking release records is easy. Just open the Xiaohongshu App and click &quot;Me&quot; → &quot;Publish&quot; → &quot;All Publications&quot; to view your own publishing records. Here you can easily find previously published notes. 3.Repost. If found

How to connect Apple Notes on iPhone in the latest iOS 17 system How to connect Apple Notes on iPhone in the latest iOS 17 system Sep 22, 2023 pm 05:01 PM

Link AppleNotes on iPhone using the Add Link feature. Notes: You can only create links between Apple Notes on iPhone if you have iOS17 installed. Open the Notes app on your iPhone. Now, open the note where you want to add the link. You can also choose to create a new note. Click anywhere on the screen. This will show you a menu. Click the arrow on the right to see the "Add link" option. click it. Now you can type the name of the note or the web page URL. Then, click Done in the upper right corner and the added link will appear in the note. If you want to add a link to a word, just double-click the word to select it, select "Add Link" and press

How to add product links in notes in Xiaohongshu Tutorial on adding product links in notes in Xiaohongshu How to add product links in notes in Xiaohongshu Tutorial on adding product links in notes in Xiaohongshu Mar 12, 2024 am 10:40 AM

How to add product links in notes in Xiaohongshu? In the Xiaohongshu app, users can not only browse various contents but also shop, so there is a lot of content about shopping recommendations and good product sharing in this app. If If you are an expert on this app, you can also share some shopping experiences, find merchants for cooperation, add links in notes, etc. Many people are willing to use this app for shopping, because it is not only convenient, but also has many Experts will make some recommendations. You can browse interesting content and see if there are any clothing products that suit you. Let’s take a look at how to add product links to notes! How to add product links to Xiaohongshu Notes Open the app on the desktop of your mobile phone. Click on the app homepage

How to publish notes tutorial on Xiaohongshu? Can it block people by posting notes? How to publish notes tutorial on Xiaohongshu? Can it block people by posting notes? Mar 25, 2024 pm 03:20 PM

As a lifestyle sharing platform, Xiaohongshu covers notes in various fields such as food, travel, and beauty. Many users want to share their notes on Xiaohongshu but don’t know how to do it. In this article, we will detail the process of posting notes on Xiaohongshu and explore how to block specific users on the platform. 1. How to publish notes tutorial on Xiaohongshu? 1. Register and log in: First, you need to download the Xiaohongshu APP on your mobile phone and complete the registration and login. It is very important to complete your personal information in the personal center. By uploading your avatar, filling in your nickname and personal introduction, you can make it easier for other users to understand your information, and also help them pay better attention to your notes. 3. Select the publishing channel: At the bottom of the homepage, click the &quot;Send Notes&quot; button and select the channel you want to publish.

Engine landscape changes: Three-cylinder engines challenge the dominance of six-cylinders and eight-cylinders Engine landscape changes: Three-cylinder engines challenge the dominance of six-cylinders and eight-cylinders Oct 08, 2023 pm 10:57 PM

According to news on October 8, the U.S. auto market is undergoing a change under the hood. The previously beloved six-cylinder and eight-cylinder power engines are gradually losing their dominance, while three-cylinder engines are emerging. News on October 8 showed that the U.S. auto market is undergoing a change under the hood. The beloved six-cylinder and eight-cylinder power engines in the past are gradually losing their dominance, and the three-cylinder engine is beginning to emerge. In most people's minds, Americans love large-displacement models, and the "American big V8" has always been the Synonymous with American cars. However, according to data recently released by foreign media, the landscape of the U.S. auto market is undergoing tremendous changes, and the battle under the hood is intensifying. It is understood that before 2019, the United States

Super realistic rendering! Unreal Engine technology expert explains the global illumination system Lumen Super realistic rendering! Unreal Engine technology expert explains the global illumination system Lumen Apr 08, 2023 pm 10:21 PM

Real-time global illumination (Real-time GI) has always been the holy grail of computer graphics. Over the years, the industry has proposed various methods to solve this problem. Common methods include constraining the problem domain by utilizing certain assumptions, such as static geometry, a rough scene representation, or tracking rough probes, and interpolating lighting between the two. In Unreal Engine, the global illumination and reflection system Lumen technology was co-founded by Krzysztof Narkowicz and Daniel Wright. The goal was to build a solution that was different from its predecessors, capable of achieving uniform lighting and a baked-like lighting quality. Recently, at SIGGRAPH 2022, Krzysztof Narko

See all articles