当前位置:网站首页>MySQL数据库常识之储存引擎
MySQL数据库常识之储存引擎
2022-04-22 10:17: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://cloud.tencent.com/developer/article/1985608
边栏推荐
- golang 时间格式化
- 西门子PLC能否通过以太网数据模块实现无线通讯?
- 中商惠⺠交易中台架构演进:对 Apache ShardingSphere 的应⽤
- Introduction and basic use of numpy Library
- Dext diagnostic database supporting AUTOSAR classic and adaptive platform
- Cobbler cobbler cobbler
- Usage of stringstream
- Linux 7 silent installation oracle12c reports an error [fatal] [ins-35344] the value is not specified
- 天梯22模拟 L3-2 拼题A打卡奖励 (30 分)
- Google Earth Engine(GEE)——聚合网格化人口数据
猜你喜欢

最通俗易懂的依赖注入之生命周期

企业级 Web 开发的挑战

Usage of stringstream

Introduction and basic use of numpy Library

Matplotlib tutorial 04 --- drawing commonly used graphics

Grpc experience of multilingual communication foundation

分享几个 Sklearn 模块中不为人知又超级好用的 API 函数

UKUI3 支持 openEuler 22.03 LTS

The working principle of triode, FET and MOS transistor

三分钟快速了解互动涂鸦
随机推荐
Golang time formatting
多语言通信基础 05 go的grpc体验
Memory management-
Linux 7 silent installation of Oracle 11g
JWT source code analysis (four layer package with schematic diagram)
Basic concepts of radiometry
【HLS】可变帧率和固定帧率拉流
Cobbler cobbler cobbler
Error message during unity3d build: missing project ID in unity solution
Laya Uncaught ReferenceError: spine is not defined
2022-04-21 MySQL InnoDB storage engine core processing
OGG-00663 OCI Error ORA-02396: exceeded maximum idle time
Matplotlib tutorial 04 --- drawing commonly used graphics
[C language advanced level 10 -- character and string functions and their simulation implementation (1)]
Zhongshanghui ⺠ evolution of trading platform architecture: response to Apache shardingsphere
formDate保存数据
You need to specify one of MySQL_ ROOT_ PASSWORD, MYSQL_ ALLOW_ EMPTY_ PASSWORD and MYSQ
Grpc experience of multilingual communication foundation
MySQL隐式转换案例一则
[moistening C language] Beginner - start from scratch - 5 (modular design - function, value transmission and address transmission)