当前位置:网站首页>MySQL数据库常识之储存引擎
MySQL数据库常识之储存引擎
2022-04-23 20:39:00 【小简(JanYork)】
储存引擎分类
show engines;
这个命令可以查看数据库的数据引擎,可以看到InnoDB
是默认的引擎。
命令除了在终端运行,也可以在查询数据库可视化工具中运行。
而,(我是5.7版本)我们可以看出数据库中,存储引擎一共有九个。
分别是**InnoDB
、MRG_MYISAM
、MEMORY
、BLACKHOLE
、MyISAM
、CSV
、ARCHIVE
、PERFORMANCE_SCHEMA
、FEDERATED
**。
设置默认引擎
SHOW VARIABLES LIKE 'default_storage_engine%'
这个语句可以查询当前默认的数据库引擎。
default_storage_engine%
表示查询默认数据库存储引擎。
如果我们要修改默认储存引擎,我们可以通过修改my.ini
/my.cnf
文件实现(不建议!)。
添加
default-storage-engine
= 数据库引擎名(INNODB
/MYISAM
)。sudo service mysql restart
用命令重启
mysql
。
使用下面的语句可以修改数据库临时的默认存储引擎:
SET default_storage_engine=< 存储引擎名 >
但是当再次重启客户端时,默认存储引擎仍然是InnoDB
。
创建表时指定引擎
CREATE TABLE 表名 (
-- 字段省略
) ENGINE = MyISAM;
**ENGINE = 引擎类型
**接在建表语句最后,可以指定引擎。
版权声明
本文为[小简(JanYork)]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_60750453/article/details/124326290
边栏推荐
- 打新债中签以后怎么办,网上开户安全吗
- Preliminary understanding of cache elimination algorithm (LRU and LFU)
- 上海回應“面粉官網是非法網站”:疏於運維被“黑”,警方已立案
- Matlab: psychtoolbox installation
- Monte Carlo py solves the area problem! (save pupils Series)
- Syntax Error: TypeError: this. getOptions is not a function
- 【PTA】整除光棍
- The iswow64process function determines the number of program bits
- "Meta function" of tidb 6.0: what is placement rules in SQL?
- Implementation of mypromise
猜你喜欢
上海回應“面粉官網是非法網站”:疏於運維被“黑”,警方已立案
Shanghai a répondu que « le site officiel de la farine est illégal »: l'exploitation et l'entretien négligents ont été « noirs » et la police a déposé une plainte
Commit and rollback in DCL of 16 MySQL
Case of the third day of go language development fresh every day project - news release system II
Matlab: psychtoolbox installation
Browser - learning notes
GO语言开发天天生鲜项目第三天 案例-新闻发布系统二
LeetCode 994、腐烂的橘子
Shanghai responded that "flour official website is an illegal website": neglect of operation and maintenance has been "hacked", and the police have filed a case
ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
随机推荐
Plato Farm元宇宙IEO上线四大,链上交易颇高
go map
Go限制深度遍历目录下文件
Modeling based on catiav6
The construction and use of Fortress machine and springboard machine jumpserver are detailed in pictures and texts
Actual measurement of automatic ticket grabbing script of barley network based on selenium (the first part of the new year)
Syntaxerror: unexpected token r in JSON at position 0
SQL: query duplicate data and delete duplicate data
上海回應“面粉官網是非法網站”:疏於運維被“黑”,警方已立案
Leetcode 1337. Row K with the weakest combat effectiveness in the matrix
[SQL] string series 2: split a string into multiple lines according to specific characters
Imitation Baidu map realizes the three buttons to switch the map mode by automatically shrinking the bottom
Es keyword sorting error reason = fielddata is disabled on text fields by default Set fielddata = true on keyword in order
LeetCode 20、有效的括号
Tensorflow 2 basic operation dictionary
A login and exit component based on token
[stack and queue topics] - sliding window
Unity solves Z-fighting
LeetCode 232、用栈实现队列
go array