当前位置:网站首页>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
边栏推荐
- go map
- Vscode download speed up
- Scrapy教程 - (2)寫一個簡單爬蟲
- Leetcode 74. Search two-dimensional matrix
- 堡垒机、跳板机JumpServer的搭建,以及使用,图文详细
- BMP JPEG picture to vector image contourtrace
- Leetcode 1346. Check whether integers and their multiples exist
- How can matlab obtain the truncated image in trainingimagelabeler
- Latest investigation and progress of building intelligence based on sati
- XXXI` Prototype ` displays prototype properties and`__ proto__` Implicit prototype properties
猜你喜欢

Linux64Bit下安装MySQL5.6-不能修改root密码

2021-09-02 unity project uses rider to build hot change project failure record of ilruntime

堡垒机、跳板机JumpServer的搭建,以及使用,图文详细

LeetCode 116. 填充每个节点的下一个右侧节点指针

Matlab: psychtoolbox installation

High paid programmer & interview question series 91 limit 20000 loading is very slow. How to solve it? How to locate slow SQL?

LeetCode 116. Populate the next right node pointer for each node

On IRP from the perspective of source code

缓存淘汰算法初步认识(LRU和LFU)

Unity solves Z-fighting
随机推荐
How to do after winning the new debt? Is it safe to open an account online
bounding box iou
Unity animation creates sequence frame code and generates animationclip
LeetCode 994、腐烂的橘子
LeetCode 1351、统计有序矩阵中的负数
Leetcode 20. Valid parentheses
XXXI` Prototype ` displays prototype properties and`__ proto__` Implicit prototype properties
Matlab analytic hierarchy process to quickly calculate the weight
ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
Come in and teach you how to solve the problem of port occupation
Unity ECS dots notes
缓存淘汰算法初步认识(LRU和LFU)
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
Mathematical modeling column | Part 5: MATLAB optimization model solving method (Part I): Standard Model
SQL: query duplicate data and delete duplicate data
CONDA environment management command
LeetCode 116. Populate the next right node pointer for each node
Analysis of the relationship between generalized Bim and CAD under the current background
Rt-1052 learning notes - GPIO architecture analysis
Matlab matrix index problem