当前位置:网站首页>Introduction to database - a brief introduction to MySQL
Introduction to database - a brief introduction to MySQL
2022-07-27 03:26:00 【Caribbean waves】
2、MySQL Introduction to
Hello everyone , This time I bring you my new column : database , The database is relatively not that difficult , As long as you practice hard 、 Memorize grammar , I believe that learning database well is not a problem , Bloggers will start from 0 analyse , Explain the knowledge points of database step by step , And will give many examples . most important of all , Bloggers will not use software , Use the most primitive way -> Command line to explain , The advantage of this explanation is to write sentence by sentence , It won't cause the problem that readers can't keep up with their ideas !
QQ:162196770
WeChat :PRIDE_Xu_
Gitee:https://gitee.com/jialebihaitao
The next blog portal :
Article column :
2.1 It's a " client - The server " The program of structure
MySQL This database , It's a “ client - The server ” The program of structure ~, So this “ client - The server ” It's the time of network communication , Both sides of the communication , Separate names .
- The party who initiated the request , It's called the client Data sent by the client to the server , be called “ request ”
- The party who passively accepts the request , It's called a server The data returned by the server to the client , be called “ Respond to “
You installed MySQL, It is equivalent to installing the client , The server is also installed , Between the client and the server is through “ The Internet ” To communicate ~
Then we configure the server and client to a host , But our computers are not connected to the Internet , Is it still possible to communicate ?
The answer is : Sure . If you are not connected to the network , We just can't access other hosts , But I can still visit myself , This is because the operating system performs some internal processing , Virtual out a special network card , be called " Loopback network card " .
So we use MySQL This is probably the case ~
Situation 1 :

Situation two :

Situation three : A more typical case ~

Be careful :MySQL The server is Database noumenon ,( Save and manage data on the server side )
2.2 MySQL Installation
Be careful : We currently install MySQL, To use 5.x series (5.5,5.6,5.7… It doesn't matter ), It must be a big version 5
The latest version is MySQL 8 series ( Don't suggest ), For starters , Configuration is more complicated ~~
2.3 MySQL Chinese failure problem
MySQL Chinese failure problem _ Caribbean Haitao's blog -CSDN Blog
2.4 Related issues
2.4.1 Server program
Server programs generally do not need an interface , Just a quiet cat backstage , Help us do dirty work and hard work
Check the method :
Search for -> service

find
MySQL57, Normally , When you take yourMySQLAfter successful installation , The status here is running , And it will start automatically every time you start it
We can also turn on and off the service in the command line
net stop The service name ; net start The service name ;Other services can also use this statement
2.4.2 client

You can choose any one ( Recommended choice unicode)
After opening it, it looks like this

He will prompt us to enter the password , Enter the password we set before , It will be like this

To see this , Just explain , At present, our client , The database server has been connected
Next , Any request we make , In essence, the client sends a network request to the server , The server returned a specific response

!!! Be careful !!!
Don't make the password too complicated , Can't remember
Forget the password : The easiest way -> reinstall ( Uninstall is also done by installing packages ,remove)
You can also modifyMySQLThe configuration file for the server , Skip permission table login ( More trouble )Do you think it is unsafe to choose a password casually ?
The answer is : Can't ! Very safe !!!
Our database has no valuable data , What kind of data is valuable data ?
Computers used at work , Many of them belong to “ Trade secrets ”

2.5 Common database models
adopt "SQL" To manipulate the database , The database inside represents a MySQL An independent data set managed on the server ~

Take another chestnut ~
The educational administration system of the school , All have the function of selecting courses Scoring function View personal information function
Then we can analyze , We need several databases to store information with different functions .
Let's take the function of viewing personal information for example

In fact, that is database -> Data sheet -> That's ok -> Column
As long as it's a relational database , It stores data according to the above form
2.6 MySQL Preliminary operation of
Open with the command line
MySQLBefore , We can use it by opening the application in the menu bar
MySQL, We can also connect toMySQLThe serverLog in locally ( Show the form of writing a password ):mysql -uroot -p123456 Log in locally ( In the form of hidden passwords ):mysql -uroot -p

Check the database version
select version();
View currently used databases
select database();
Import ready-made
SQLfilestay
MySQLInput insource, Then drag the file to be importedsource D:\study\MySQL\document\test.sql
Be careful : No Chinese in the path !!!!
sign out
MySQL:exit
边栏推荐
- [learning notes, dog learning C] string + memory function
- LPCI-252通用型PCI接口CAN卡的功能和应用介绍
- 最低票价(DAY 80)
- opiodr aborting process unknown ospid (21745) as a result of ORA-609
- 客户案例 | 关注老年用户体验,银行APP适老化改造要避虚就实
- 消息被拒MQ
- Spark Learning Notes (V) -- spark core core programming RDD conversion operator
- 177. The nth highest salary (simple)
- MySQL underlying data structure
- volatile关键字及其作用
猜你喜欢

Deeply understand the underlying data structure and algorithm of MySQL index

spark学习笔记(六)——sparkcore核心编程-RDD行动算子

Explain

30分钟彻底弄懂 synchronized 锁升级过程

Code practice when the queue reaches the maximum length

C语言const用法详解

客户案例 | 关注老年用户体验,银行APP适老化改造要避虚就实

网络安全/渗透测试工具AWVS14.9下载/使用教程/安装教程

Worthington果胶酶的特性及测定方案

impala 执行计划详解
随机推荐
Spark Learning Notes (VI) -- spark core core programming RDD action operator
Oracle有没有分布式数据库?
二叉树(DAY 82)
redis入门练习
架构基本概念和架构本质
[understanding of opportunity -52]: the depth of communication varies from person to person
Worthington木瓜蛋白酶解离系统解决方案
Activiti5.22.0 extension supports domestic databases, taking gbase database as an example
177. The nth highest salary (simple)
redis秒杀案例,跟着b站尚硅谷老师学习
be based on. NETCORE development blog project starblog - (16) some new functions (monitoring / statistics / configuration / initialization)
技术风向标 | 云原生技术架构成熟度模型解读
Detailed explanation of const usage in C language
Does Oracle have a distributed database?
Mysql: summary of common sub database and sub table schemes of Internet companies
【树链剖分】模板题
Idea 中添加支持@Data 插件
阿里 Seata 新版本终于解决了 TCC 模式的幂等、悬挂和空回滚问题
网络安全/渗透测试工具AWVS14.9下载/使用教程/安装教程
mysql如何优化
