欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

切换阿里镜像源,加速MySQL下载安装

程序员文章站 2022-03-07 19:25:46
...

一、参考链接

阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)

mysql镜像-mysql下载地址-mysql安装教程-阿里巴巴开源镜像站 (aliyun.com)

二、MySQL简介

MySQL数据库服务是一种完全托管的数据库服务,用于部署云原生应用程序。HeatWave是一个集成的高性能分析引擎,可将MySQL性能提高400倍。

下载地址https://mirrors.aliyun.com/mysql/

三、MySQL安装

  1. # 下载安装mysql的repo源(基于CentOS系统下)
  2. [root@centos ~]# wget http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm
  3. --2021-12-24 20:47:58-- http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm
  4. Resolving repo.mysql.com (repo.mysql.com)... 23.58.112.230
  5. Connecting to repo.mysql.com (repo.mysql.com)|23.58.112.230|:80... connected.
  6. HTTP request sent, awaiting response... 200 OK
  7. Length: 8984 (8.8K) [application/x-redhat-package-manager]
  8. Saving to: 鈥榤ysql57-community-release-el7-7.noarch.rpm鈥?
  9. 100%[==============================================================================>] 8,984 --.-K/s in 0s
  10. 2021-12-24 20:47:58 (80.1 MB/s) - 鈥榤ysql57-community-release-el7-7.noarch.rpm鈥?saved [8984/8984]
  11. # 安装mysql的repo源
  12. [root@centos ~]# rpm -ivh mysql57-community-release-el7-7.noarch.rpm
  13. warning: mysql57-community-release-el7-7.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
  14. Preparing... ################################# [100%]
  15. Updating / installing...
  16. 1:mysql57-community-release-el7-7 ################################# [100%]
  17. [root@centos ~]#

安装MySQL

  1. [root@centos ~]# yum install -y mysql-server mysql-devel mysql
  2. [root@centos ~]# rpm -qa | grep mysql
  3. mysql-community-server-5.7.36-1.el7.x86_64
  4. mysql57-community-release-el7-7.noarch
  5. mysql-community-common-5.7.36-1.el7.x86_64
  6. mysql-community-client-5.7.36-1.el7.x86_64
  7. mysql-community-devel-5.7.36-1.el7.x86_64
  8. mysql-community-libs-5.7.36-1.el7.x86_64
  9. mysql-community-libs-compat-5.7.36-1.el7.x86_64
  10. [root@centos ~]#

切换阿里镜像源,加速MySQL下载安装

四、启动MySQL服务

  1. [root@centos ~]# systemctl start mysqld
  2. [root@centos ~]# systemctl enable mysqld
  3. [root@centos ~]# systemctl status mysqld
  4. 鈼? mysqld.service - MySQL Server
  5. Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
  6. Active: active (running) since Fri 2021-12-24 21:07:35 CST; 14s ago
  7. Docs: man:mysqld(8)
  8. http://dev.mysql.com/doc/refman/en/using-systemd.html
  9. Main PID: 2246 (mysqld)
  10. CGroup: /system.slice/mysqld.service
  11. 鈹斺攢2246 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
  12. Dec 24 21:07:31 centos systemd[1]: Starting MySQL Server...
  13. Dec 24 21:07:35 centos systemd[1]: Started MySQL Server.
  14. [root@centos ~]#

切换阿里镜像源,加速MySQL下载安装