一、参考链接
阿里巴巴开源镜像站 -OPSX 镜像站 - 阿里云开发者社区 (aliyun.com)
mysql 镜像 -mysql 下载地址 -mysql 装置教程 - 阿里巴巴开源镜像站 (aliyun.com)
二、MySQL 简介
MySQL 数据库服务是一种齐全托管的数据库服务,用于部署云原生应用程序。HeatWave 是一个集成的高性能剖析引擎,可将 MySQL 性能进步 400 倍。
下载地址 :https://mirrors.aliyun.com/my…
三、MySQL 装置
# 下载安装 mysql 的 repo 源(基于 CentOS 零碎下)[root@centos ~]# wget http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm
--2021-12-24 20:47:58-- http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm
Resolving repo.mysql.com (repo.mysql.com)... 23.58.112.230
Connecting to repo.mysql.com (repo.mysql.com)|23.58.112.230|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8984 (8.8K) [application/x-redhat-package-manager]
Saving to: 鈥榤 ysql57-community-release-el7-7.noarch.rpm 鈥?
100%[==============================================================================>] 8,984 --.-K/s in 0s
2021-12-24 20:47:58 (80.1 MB/s) - 鈥榤 ysql57-community-release-el7-7.noarch.rpm 鈥?saved [8984/8984]
# 装置 mysql 的 repo 源
[root@centos ~]# rpm -ivh mysql57-community-release-el7-7.noarch.rpm
warning: mysql57-community-release-el7-7.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:mysql57-community-release-el7-7 ################################# [100%]
[root@centos ~]#
装置 MySQL
[root@centos ~]# yum install -y mysql-server mysql-devel mysql
[root@centos ~]# rpm -qa | grep mysql
mysql-community-server-5.7.36-1.el7.x86_64
mysql57-community-release-el7-7.noarch
mysql-community-common-5.7.36-1.el7.x86_64
mysql-community-client-5.7.36-1.el7.x86_64
mysql-community-devel-5.7.36-1.el7.x86_64
mysql-community-libs-5.7.36-1.el7.x86_64
mysql-community-libs-compat-5.7.36-1.el7.x86_64
[root@centos ~]#
四、启动 MySQL 服务
[root@centos ~]# systemctl start mysqld
[root@centos ~]# systemctl enable mysqld
[root@centos ~]# systemctl status mysqld
鈼? mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-12-24 21:07:35 CST; 14s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Main PID: 2246 (mysqld)
CGroup: /system.slice/mysqld.service
鈹斺攢 2246 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
Dec 24 21:07:31 centos systemd[1]: Starting MySQL Server...
Dec 24 21:07:35 centos systemd[1]: Started MySQL Server.
[root@centos ~]#