当前位置:网站首页>MySQL ---- first acquaintance with MySQL
MySQL ---- first acquaintance with MySQL
2022-07-06 22:30:00 【4nc414g0n】
First time to know MySQL
Concept and installation
The database is “ Organize... According to the data structure 、 Warehouse for storing and managing data ”. Is a long-term storage in the computer 、 organized 、 Shareable 、 A collection of large amounts of data under unified management
It is mainly used to solve the shortcomings of file saving data :
- File security issues
- Files are not conducive to data query and management
- Files are not conducive to storing large amounts of data
- It's not convenient to control the file in the program
Mainstream databases :
- SQL Sever: Microsoft products ,.Net Programmer's favorite , Medium and large scale projects .
- Oracle: Oracle products , Suitable for large projects , Complex business logic , Concurrency is generally not as good as MySQL.
- MySQL: The world's most popular database , It belongs to Oracle , Good concurrency , Not suitable for complex business . Mainly used in e-commerce ,SNS, Forum . For the simple SQL The treatment effect is good .
- PostgreSQL : A relational database developed by the computer department of the University of California, Berkeley , Whether it's for private use , commercial , Or for academic research , Free to use , Modify and distribute .
- SQLite: It's a lightweight database , Abide by ACID Database management system based on RDBMS , It's contained in a relatively small C In the library . Its design goal is embedded , And it has been used in many embedded products , It takes up very low resources , In embedded devices , It may take only a few hundred K That's enough memory .
- H2: It's a use. Java Development of embedded database , It itself is just a class library , It can be directly embedded into the application project
Linux Next MySQL Installation :centos7 install Mysql 5.7.27, Detailed and complete tutorial
MySQL Use
Connect to server :
mysql -h [ The goal is IP] -P [ port ] -u root -pamong:
- Not added -h The parameter represents the default local loopback
- Not added -P Parameter indicates the default 3306 port
- start-up mysql:service mysqld start
- stop it mysql:service mysqld stop
- restart mysql:service mysqld restart
- mysql Whether to start :service mysqld status
Create database :
create database [ Database name ];
Display all databases :show databases;
Delete a database :drop database [ Database name ];
Use a database :use [ Database name ];
Create database tables :create table account(id int, nickname varchar(32), gender varchar(2));
Show table status :desc [ Table name ];
insert data :insert into account(id, nickname, gender) values (1, 'test', 'male');
View all the contents of the table :select * from [ Table name ];
understand MySQL
The essence of a database is that it has a client , The network program of the server ,MySQL Is a portable database
Database program understanding :
- adopt MySQL Client to mysqld server Sponsored create database Create table operation , stay Linux The essence is in /var/lib/mysql Create a directory ,
- Create a table structure in a database , Essentially, it is to create multiple ordinary files
MySQL framework :
Be careful: All in the application layer
SQL classification :
- DDL【data definition language】 Data definition language , Used to maintain the structure of stored data , For instructions : create, drop, alter
- DML【data manipulation language】 Data manipulation language , Used to manipulate data , For instructions : insert,delete,update
- DML There is another one in the DQL【Data QueryLanguage】, Data query language , For instructions : select
- DCL【Data Control Language】 Data control language , Mainly responsible for authority management and affairs , For instructions : grant,revoke,commit
MySQL Supported storage engines :
show engines;The most commonly used is InnoDB and MyISAM
边栏推荐
- 2022-07-05 stonedb sub query processing parsing time analysis
- 网络基础入门理解
- Notes de développement du matériel (10): flux de base du développement du matériel, fabrication d'un module USB à RS232 (9): création de la Bibliothèque d'emballage ch340g / max232 SOP - 16 et Associa
- UE4蓝图学习篇(四)--流程控制ForLoop和WhileLoop
- Senior soft test (Information System Project Manager) high frequency test site: project quality management
- CCNA-思科网络 EIGRP协议
- 2022-07-04 mysql的高性能数据库引擎stonedb在centos7.9编译及运行
- AdaViT——自适应选择计算结构的动态网络
- 十二、启动流程
- MySQL----初识MySQL
猜你喜欢

Improving Multimodal Accuracy Through Modality Pre-training and Attention

网络基础入门理解

Notes de développement du matériel (10): flux de base du développement du matériel, fabrication d'un module USB à RS232 (9): création de la Bibliothèque d'emballage ch340g / max232 SOP - 16 et Associa

HDR image reconstruction from a single exposure using deep CNN reading notes

(18) LCD1602 experiment

CCNA-思科网络 EIGRP协议

Management background --1 Create classification

0 basic learning C language - interrupt

Web APIs DOM time object

That's why you can't understand recursion
随机推荐
Heavyweight news | softing fg-200 has obtained China 3C explosion-proof certification to provide safety assurance for customers' on-site testing
Web APIs DOM time object
二分图判定
pytorch_YOLOX剪枝【附代码】
2022-07-04 the high-performance database engine stonedb of MySQL is compiled and run in centos7.9
Data storage (1)
AdaViT——自适应选择计算结构的动态网络
Plafond du tutoriel MySQL, bien collecté, regardez lentement
Management background --4, delete classification
pytorch_ Yolox pruning [with code]
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
Improving Multimodal Accuracy Through Modality Pre-training and Attention
自定义 swap 函数
Leetcode exercise - Sword finger offer 26 Substructure of tree
How do I write Flask's excellent debug log message to a file in production?
(18) LCD1602 experiment
基於 QEMUv8 搭建 OP-TEE 開發環境
C# 三种方式实现Socket数据接收
基于 QEMUv8 搭建 OP-TEE 开发环境
volatile关键字









