当前位置:网站首页>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 -p
among
:
- 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
边栏推荐
- Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
- SQL Server生成自增序号
- AdaViT——自适应选择计算结构的动态网络
- Aardio - 利用customPlus库+plus构造一个多按钮组件
- 关于声子和热输运计算中BORN电荷和non-analytic修正的问题
- General implementation and encapsulation of go diversified timing tasks
- LeetCode 练习——剑指 Offer 26. 树的子结构
- i. Mx6ull build boa server details and some of the problems encountered
- anaconda安装第三方包
- 重磅新闻 | Softing FG-200获得中国3C防爆认证 为客户现场测试提供安全保障
猜你喜欢
云原生技术--- 容器知识点
[线性代数] 1.3 n阶行列式
将MySQL的表数据纯净方式导出
二分图判定
0 basic learning C language - digital tube
MySQL数据库基本操作-DML
2021 geometry deep learning master Michael Bronstein long article analysis
pytorch_ Yolox pruning [with code]
3DMAX assign face map
Adavit -- dynamic network with adaptive selection of computing structure
随机推荐
Aardio - 封装库时批量处理属性与回调函数的方法
sizeof关键字
Daily question 1: force deduction: 225: realize stack with queue
volatile关键字
Aardio - 不声明直接传float数值的方法
AI enterprise multi cloud storage architecture practice | Shenzhen potential technology sharing
2022-07-05 使用tpcc对stonedb进行子查询测试
Unity3d minigame-unity-webgl-transform插件转换微信小游戏报错To use dlopen, you need to use Emscripten‘s...问题
rust知识思维导图xmind
Pit encountered by handwritten ABA
Mise en place d'un environnement de développement OP - tee basé sur qemuv8
Inno setup packaging and signing Guide
LeetCode 练习——剑指 Offer 26. 树的子结构
three.js绚烂的气泡效果
剪映+json解析将视频中的声音转换成文本
【编译原理】做了一半的LR(0)分析器
Memorabilia of domestic database in June 2022 - ink Sky Wheel
leetcode:面试题 17.24. 子矩阵最大累加和(待研究)
2022-07-05 use TPCC to conduct sub query test on stonedb
void关键字