当前位置:网站首页>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
边栏推荐
- 《稻盛和夫给年轻人的忠告》阅读笔记
- Worthington过氧化物酶活性的6种测定方法
- opiodr aborting process unknown ospid (21745) as a result of ORA-609
- 30 minutes to thoroughly understand the synchronized lock upgrade process
- opiodr aborting process unknown ospid (21745) as a result of ORA-609
- mysql出现不存在错误
- Penetration test - post penetration - Trace cleaning
- pip3 设置阿里云
- 185. All employees with the top three highest wages in the Department (mandatory)
- 水仙花数(DAY 78)
猜你喜欢
随机推荐
spark:计算不同分区中相同key的平均值(入门级-简单实现)
二叉树(北京邮电大学机试题)(DAY 85)
【常用搜索问题】111
How to design the red table of database to optimize the performance
Volatile keyword and its function
redis入门练习
Take you to know what Web3.0 is
Deeply understand the underlying data structure and algorithm of MySQL index
spark学习笔记(六)——sparkcore核心编程-RDD行动算子
延时队列的几种实现姿势?日常必备技能!
opiodr aborting process unknown ospid (21745) as a result of ORA-609
Comprehensive care analysis lyriq Ruige battery safety design
常见弱口令大全
二叉树(DAY 82)
vector 转 svg 方法
Worthington果胶酶的特性及测定方案
Byte side: can TCP and UDP use the same port?
优炫数据库集群如何唯一标识一条用户SQL
Technology vane | interpretation of cloud native technology architecture maturity model
[flask] the server obtains the request header information of the client










