1. The background

Use this article to record my process of learning mysql.

2. Knowledge

Introduction to Storage Engines

The storage engine is the underlying component of the database. The database management system uses the engine to create, query, update, and delete data.

Run the show engines command to query:

image.png

InnoDB Storage engine InnoDB is the engine of choice for transactional databases, supporting transactional security (ACID), row locking and foreign keys. InnoDB is the default storage engine.

MyISAM storage engine MyISAM uses friends for higher insert, query speed, but does not support transactions.

Memory Storage engine The Memory storage engine stores data from tables into Memory, providing fast access to query and reference data from other tables.

Archive storage engine If you only have Insert and SELECT operations, you can choose the Archive engine, which supports highly concurrent inserts but is not transaction safe. The Archive engine is ideal for storing archived data, such as logging information.

Example 3.

(1) Log in to mysql

Mysql -u root -p Then enter the passwordCopy the code

(2) Create database

CREATE DATABASE zoo;
Copy the code

(3) Check which databases are available

SHOW DATABASES;
Copy the code

(4) Delete database

DROP DATABASE zoo;
Copy the code

END