当前位置:网站首页>Basic concept of MySQL database and deployment of MySQL version 8.0 (I)
Basic concept of MySQL database and deployment of MySQL version 8.0 (I)
2022-07-28 23:14:00 【web15286201346】
MySQL The basic concept of database and MySQL8.0 Version deployment
List of articles
- MySQL The basic concept of database and MySQL8.0 Version deployment
- 1.MySQL Database related concepts
- 2. stay Linux In the system MySQL database
- 2.1. download MySQL Database installation package
- 2.2. install MySQL Database system
- 2.3. start-up MySQL service
- 2.4. see MySQL Automatically generated root User password
- 2.5. land MySQL Database system
- 2.6. modify root User's password
- 2.7. Set allowed root User remote login
- 2.8. Use Navicat Remote connection MySQL database
1.MySQL Database related concepts
1.1. Terminology in the database
- database
- The warehouse that actually stores data , The data in the warehouse is organized 、 Storage with sequence .
- The database is called DateBase, abbreviation DB.
- Database management system
- A large software system that operates and manages databases , For example, common MySQL、Oracle、PostgreSQL And so on are database software .
- Database management system DateBase Management System, abbreviation DBMS.
- SQL
- Programming language for operating relational databases , adopt SQL It is very convenient to add, delete, modify and query the data in the database .
- SQL The full name is Structured Query Language.
1.2. Mainstream database software
The mainstream databases are Oracle、MySQL、SQL Server、PostgreSQL, One of the most mainstream is MySQL database .
Oracle: Large charging database ,Oracle The products of the company , Expensive .
MySQL: Open source free small and medium-sized databases , later Sun The company acquired MySQL, and Oracle Buy again Sun company . at present Oracle Launched a paid version of MySQL, A free community version is also available .SQL Server:Microsoft Medium sized companies charge for launching databases ,C#、.net And other languages are commonly used .
PostgreSQL: Open source free small and medium-sized databases .
DB2:IBM The company's large charging database products .
SQLLite: Embedded micro database .Android The built-in database adopts this database .
MariaDB: Open source free small and medium-sized databases . yes MySQL Another branch of the database 、 Another derivative .
1.3. The concept of relational database
Relational database , abbreviation RBDMS, A relational database is based on a relational model , A database consisting of multiple interrelated two-dimensional tables , As shown in the figure below , There are personnel information form and occupation information form , There is a in the personnel information table job Field , This field corresponds to the occupation name , There is a job_name Field , Stored in this field is the name of the profession , Logically speaking , These two data tables are related ,job and job_name Fields correspond to each other .
Features of relational database :
- Use tables to store data , use the same pattern , Easy to maintain .
- Individual fields in the related tables will correspond one by one , have access to SQL Language , Query uniformly .
1.4.MySQL The data model of the database
MySQL The data model of is shown in the figure below , Client connection DBMS, That is, database system , such as MySQL, Use SQL Statement can be in MySQL Multiple databases can be created in the database management system , Multiple tables can be created in one database , Unlimited data can be stored in the table .

1.5.MySQL Database version
MySQL Two different versions are officially available :
Community version (MySQL Community Server)
- free , MySQL No technical support .
Commercial version (MySQL Enterprise Edition)
- charge , have access to 30 God , Official technical support
2. stay Linux In the system MySQL database
2.1. download MySQL Database installation package
MySQL Download address of database :https://downloads.mysql.com/archives/community/, This time MySQL Database version selection 8.0.26, And use rpm The way packages are built , As shown in the figure below , find RPM Bundle, Click the download button on the right , This package contains all MySQL8.0.26 Version required RPM package .

[[email protected] aa]# wget https://downloads.mysql.com/archives/get/p/23/file/mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar
2.2. install MySQL Database system
1) decompression MySQL The package
MySQL8.0.26 Version all of rpm The packages are all in this compressed package .
[[email protected] mysql-tools]# mkdir mysql-rpm
[[email protected] mysql-tools]# tar xf mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar -C mysql-rpm/
[[email protected] mysql-tools]# ll mysql-rpm/
Total usage 789340
-rw-r--r-- 1 7155 31415 47836256 7 month 2 2021 mysql-community-client-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 4694644 7 month 2 2021 mysql-community-client-plugins-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 634632 7 month 2 2021 mysql-community-common-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 6806272 7 month 2 2021 mysql-community-devel-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 23638156 7 month 2 2021 mysql-community-embedded-compat-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 4243808 7 month 2 2021 mysql-community-libs-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 1264168 7 month 2 2021 mysql-community-libs-compat-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 454689776 7 month 2 2021 mysql-community-server-8.0.26-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 264457624 7 month 2 2021 mysql-community-test-8.0.26-1.el7.x86_64.rpm
2) Install one by one in sequence MySQL Of rpm package
1. Software package since installation
[[email protected] mysql-tools]# yum install openssl-devel
2. Install in the following order MySQL
[[email protected] mysql-tools]# cd mysql-rpm/
[[email protected] mysql-rpm]# rpm -ivh mysql-community-common-8.0.26-1.el7.x86_64.rpm
[[email protected] mysql-rpm]# rpm -ivh mysql-community-client-plugins-8.0.26-1.el7.x86_64.rpm
[[email protected] mysql-rpm]# rpm -ivh mysql-community-libs-8.0.26-1.el7.x86_64.rpm
[[email protected] mysql-rpm]# rpm -ivh mysql-community-libs-compat-8.0.26-1.el7.x86_64.rpm
[[email protected] mysql-rpm]# rpm -ivh mysql-community-devel-8.0.26-1.el7.x86_64.rpm
[[email protected] mysql-rpm]# rpm -ivh mysql-community-client-8.0.26-1.el7.x86_64.rpm
[[email protected] mysql-rpm]# rpm -ivh mysql-community-server-8.0.26-1.el7.x86_64.rpm
2.3. start-up MySQL service
1. start-up mysql
[[email protected] ~]# systemctl start mysqld
[[email protected] ~]# systemctl enable mysqld
2. see mysql The process of
[[email protected] ~]# ps aux | grep mysql
mysql 13662 1.3 4.6 1771784 369128 ? Ssl 21:01 0:01 /usr/sbin/mysqld
3. see mysql Port number
[[email protected] ~]# netstat -lnpt | grep mysql
tcp6 0 0 :::33060 :::* LISTEN 13662/mysqld
tcp6 0 0 :::3306 :::* LISTEN 13662/mysqld
2.4. see MySQL Automatically generated root User password
The last field is root Password , It's not easy to remember .
[[email protected] ~]# grep 'password' /var/log/mysqld.log
2022-05-01T13:01:06.618860Z 6 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: 7DdaV)CKiJ;i
2.5. land MySQL Database system
[[email protected] ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 9
Server version: 8.0.26
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
3Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
2.6. modify root User's password
Randomly generated by the system root Passwords are not easy to remember , Let's get down to root Change your password ,MySQL 5.7 There are certain requirements for password complexity after version , But it can also be adjusted .
1) adjustment MySQL Complexity of account password
Set the complexity of the password to simple mode , And set the length of the password to the minimum 6 position .
mysql> set global validate_password.policy = 0;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password.length = 6;
Query OK, 0 rows affected (0.00 sec)
2) modify root Password
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.06 sec)
2.7. Set allowed root User remote login
stay MySQL 8.x in , By default , Systematic root User only allowed localhost Connect , No remote access , We also need to create another one named root Account number , For remote access .
mysql> create user 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
Query OK, 0 rows affected (0.07 sec)
mysql> grant all on *.* to 'root'@'%';
2.8. Use Navicat Remote connection MySQL database

边栏推荐
- 6 个超级良心的开源教程!
- Yolov5 improvement 5: improve the feature fusion network panet to bifpn
- DirectX repair tool download (where is exagear simulator package)
- Will Qualcomm and MediaTek chips soon be sold, and will they surpass Huawei to become the first in China?
- Hbuilderx shortcut key
- Improvement 16 of yolov5: replace backbone network C3 with lightweight network pp-lcnet
- Leetcode exercise 3 - palindromes
- Console.log() console display... Solution
- [3D target detection] 3dssd (II)
- Reading of "robust and communication efficient federated learning from non-i.i.d. data"
猜你喜欢

Record a question about the order of trigonometric function exchange integrals

18张图,直观理解神经网络、流形和拓扑

【图像分割】基于方向谷形检测实现静脉纹路分割附MATLAB代码

c语言进阶篇:指针(二)

安全狗入选《云安全全景图2.0》多个细项

业界首创云原生安全检测双模型!安全狗重磅报告亮相数字中国建设峰会

《Shortening passengers’ travel time A dynamic metro train scheduling approach using deep reinforcem》

一份来自奎哥的全新MPLS笔记,考IE必看 ----尚文网络奎哥

PCA学习

can‘t convert cuda:0 device type tensor to numpy. Use Tensor. cpu() to copy the tensor to host memory
随机推荐
终端输出g_debug()信息
After reading MySQL database advanced practice (SQL xiaoxuzhu)
Anr questions often asked in Android interviews
There are four ways for Nacos to configure hot updates and multiple ways to read project configuration files, @value, @refreshscope, @nacosconfigurationproperties
Cnpm installation steps
c语言进阶篇:指针(二)
美国FCC提供16亿美元资助本国运营商移除华为和中兴设备
Hands on Teaching of servlet use (1)
Cglib create proxy
(重要)初识C语言 -- 函数
Thesis reading (0) - alexnet of classification
Recurrent neural network (RNN)
Hbuilderx shortcut key
Xshell7, xftp7 personal free version official download, no need to crack, no activation, download and use
【图像分割】基于方向谷形检测实现静脉纹路分割附MATLAB代码
Console.log() console display... Solution
[image segmentation] vein segmentation based on directional valley detection with matlab code
递归和迭代
Goer shares and Shanghai Taisi Weida growth cooperation agreement! Special SOC jointly promotes the development of TWS headphones
TypeError: can‘t convert cuda:0 device type tensor to numpy. Use Tensor. cpu() to copy the tensor to