一、参考链接

阿里巴巴开源镜像站-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.rpmResolving repo.mysql.com (repo.mysql.com)... 23.58.112.230Connecting to repo.mysql.com (repo.mysql.com)|23.58.112.230|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 8984 (8.8K) [application/x-redhat-package-manager]Saving to: 鈥榤ysql57-community-release-el7-7.noarch.rpm鈥?100%[==============================================================================>] 8,984       --.-K/s   in 0s2021-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.rpmwarning: mysql57-community-release-el7-7.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing...                          ################################# [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 mysqlmysql-community-server-5.7.36-1.el7.x86_64mysql57-community-release-el7-7.noarchmysql-community-common-5.7.36-1.el7.x86_64mysql-community-client-5.7.36-1.el7.x86_64mysql-community-devel-5.7.36-1.el7.x86_64mysql-community-libs-5.7.36-1.el7.x86_64mysql-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.pidDec 24 21:07:31 centos systemd[1]: Starting MySQL Server...Dec 24 21:07:35 centos systemd[1]: Started MySQL Server.[root@centos ~]#