当前位置:网站首页>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
边栏推荐
猜你喜欢

Adavit -- dynamic network with adaptive selection of computing structure

Unity3d minigame unity webgl transform plug-in converts wechat games to use dlopen, you need to use embedded 's problem

2500 common Chinese characters + 130 common Chinese and English characters

Aardio - 不声明直接传float数值的方法

Common sense: what is "preservation" in insurance?

LeetCode刷题(十一)——顺序刷题51至55

手写ABA遇到的坑

NPDP认证|产品经理如何跨职能/跨团队沟通?

Attack and defense world miscall

Leetcode exercise - Sword finger offer 26 Substructure of tree
随机推荐
Adavit -- dynamic network with adaptive selection of computing structure
Chapter 4: talk about class loader again
Leetcode question brushing (XI) -- sequential questions brushing 51 to 55
2022年6月国产数据库大事记-墨天轮
柔性数组到底如何使用呢?
Should novice programmers memorize code?
硬件開發筆記(十): 硬件開發基本流程,制作一個USB轉RS232的模塊(九):創建CH340G/MAX232封裝庫sop-16並關聯原理圖元器件
GD32F4XX串口接收中断和闲时中断配置
Management background --2 Classification list
return 关键字
config:invalid signature 解决办法和问题排查详解
基于 QEMUv8 搭建 OP-TEE 开发环境
pytorch_ Yolox pruning [with code]
云原生技术--- 容器知识点
如何用程序确认当前系统的存储模式?
SQL server generates auto increment sequence number
二叉(搜索)树的最近公共祖先 ●●
枚举与#define 宏的区别
Anaconda installs third-party packages
Spatial domain and frequency domain image compression of images









