当前位置:网站首页>MySQL installation
MySQL installation
2022-07-27 01:53:00 【Palm nine】
MySQL install
One 、rpm install
1. Use Huawei image website to install
https://mirrors.huaweicloud.com
Search for mysql
Enter the selection directory
1.
2.
3.
Right click the copy link
4. open CETOS virtual machine 

5. Unzip to see 

6. Start installation
First, limit mariadb Related information 
Start installing package 

start-up 
Two 、 Binary installation mysql
1. Find the copy link
https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.7/mysql-5.7.37-linux-glibc2.12-x86_64.tar.gz
2. Create users and groups

3. decompression 
4. Make soft connection and modify permissions
Soft connection :
Modify the permissions :
see 
modify :
5. initialization
First, configure the environment variables 
Input :
export PATH=$PATH:/usr/local/mysql/bin
An immediate order :
Start initializing :
1. view help 
2. initialization 
( The login password is in the red box )
see :
by mysql Provide the master configuration file :
There is no need to copy from the configured virtual machine to this virtual machine in this version :
Enter into 

Change the corresponding entry to the red box value :
Enable scripting :
Copy the script to the specified location :
Check to see if you have execution rights :
Add as system service bin set to boot :
Start and view status :
Sign in :
Change password :
Verify the new password :
3、 ... and 、 sketch MySQL Architecture ( Reprinted to " Hengshan old corpse ")

At a glance, this structural system diagram seems very cumbersome , In fact, this system is similar to what we are doing web The three-tier architecture during development is somewhat similar .
The user initiates a request to the control processing layer , Control processing layer calls service Service processing ,service Service call again dao Layer for service Provide the support of data layer and return the corresponding data ( Content ), The final response to the user .
Like this , Analyze the structure diagram in detail . First of all, the structure diagram is divided into two parts , As shown in the figure below :
1、Connectors: adjoining course . Think of it as a client
2、MySQL Server: Service layer . You could view it as MySQL Server side
In the connection layer, there are many tools to initiate or establish connections , Like we are familiar with JDBC etc. .
We use JDBC For example , The operator is on the client (Connectors adjoining course ) adopt JDBC Access and establish a connection with the server , At this point, we will server (MySQL Service Service layer ) Subdivided into 4 part , The details are shown in the figure below :
When the client sends a request to the server , It will arrive first 1 in (Connection Poll: Connection pool ) To get a connection , Connections will be verified in the connection pool 、 Get the maximum number of connections, cache and other operations .
After the connection is established successfully , Then came 2 in .2 It mainly completes most of the core service functions , Such as :
Management Service & Utilities: Management services and tools , This module can mainly complete data backup and recovery 、 colony 、 Safety and system configuration related
SQL Interface:SQL Interface , In this module, we support the implementation of our encapsulated DML,DDL sentence 、 stored procedure , Storage function 、 View 、 The trigger etc.
Parser:SQL Parser , It is used to parse what will be executed SQL sentence , Filter it first
Optimizer: Optimizer , stay SQL After the statement parsing is completed ,MySQL It's going to be internal SQL Statement to optimize
Cache & Buffers: Cache layer ,SQL After the statement optimization , If it is select Statement, you may also come here to query the cache , If there is a cache record, the data will be returned directly .
2 After the operation in , Keep going down , Came to 3(Pluggable Storage Rngines: Plug in storage engine , We can choose the corresponding storage engine according to our needs MySQL Data initiator ),3 Load the storage engine ( engine => drive ), Finally, the operation falls to 4 On ( Storage layer File System: file system ), At this time, it is time to operate the file system , The file system is on the disk of the computer , Deal with stored table structures and data in the file system , The index is also stored 、 Binary log 、 Error log 、 Query log 、 Slow query logs, etc
Whole MySQL Server The composition of :
1、Connection Pool : Connection pool components
2、Management Services & Utilities: Manage service and tool components
3、SQL Interface : SQL Interface component
4、Parser: Query analyzer component
5、Optimizer : Optimizer components
6、Caches & Buffers : Buffer pool components
7、Pluggable Storage Engines : Storage engine
8、File System : file system
Four 、 Use mysql Client login server reset root password
1. First stop mysql
2. modify my.cnf To configure 
add to :
3. start-up mysql And check the status 
4. Use mysql Command to connect to mysql service , Reset root password 
5. modify mysql In the library user Table related records , Reset root The password that the user logs in from this computer

6. Restart the service , Remember to revise /etc/my.cnf Contents modified in



边栏推荐
猜你喜欢

使用ECS和OSS搭建个人网盘

C language automatically generates code comments: korofileheader plug-in

Big model training is difficult to go to the sky? Here comes the efficient and easy-to-use "Li Bai" model library

Shell (7) case statement

文本三剑客其二

Regular expression gadget series

Text three swordsman two

22FTP

RT thread learning

FTP service
随机推荐
Shell (7) case statement
Which securities company is better or safer for retail investors to open accounts
Vector容器的底层实现
Pyqt5 qtablewidget setting gives priority to the text on the right
31正则表达式
【CANN训练营】走进媒体数据处理(下)
22FTP
HarmonyOS图像处理应用开发实战直播笔记
The bottom implementation of string container
4、 Operation of numerical variables
Summary and review of key points of digital image processing
数组的定义
C language problem solving -- let the balloon rise
Shell script - backup, update and rollback of files
C language automatically generates code comments: korofileheader plug-in
Deveco could not resolve com.huawei.ohos:hap:2.4.5.0. error
Ubuntu12.10安装Mysql5.5(一)
Summary of key points of system dynamics specialized examination
It's the first time to write your own program in C language. If you have a boss, you can help a little
Regular expression gadget series