This commit is contained in:
colben 2022-03-28 20:18:27 +08:00
parent c8010c1908
commit 0715e7d6f4

View File

@ -1,12 +1,12 @@
---
title: "安装 Mysql"
title: "安装 MySQL"
date: 2019-10-30T13:00:28+08:00
lastmod: 2022-03-28T19:00:00+08:00
lastmod: 2022-03-28T20:00:00+08:00
tags: ["centos", "yum", "mysql"]
categories: ["database"]
---
## CentOS7 yum 安装 Mysql5.7
## CentOS7 yum 安装 MySQL5.7
### 环境
- CentOS 7.4 x86_64 最小安装
- MySQL 5.7.20
@ -52,7 +52,7 @@ categories: ["database"]
# 输入查找到的密码
```
## CentOS7 安装 MySQL8 通用二进制包
## 安装 MySQL8 通用二进制包
### 环境
- CentOS 7.9 x86_64 最小安装
- MySQL 8.0.28 多实例
@ -68,14 +68,21 @@ categories: ["database"]
- 下载 MySQL8 通用二进制包
```bash
cd ~
# 这是 debug 版本,软件包很大
curl -LO https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-8.0/mysql-8.0.28-linux-glibc2.12-x86_64.tar.xz
# 这是 strip 版本,软件包轻量,推荐
curl -LO https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-8.0/mysql-8.0.28-linux-glibc2.17-x86_64-minimal.tar.xz
```
- 解压
```bash
cd ~
# debug 版本
tar xf mysql-8.0.28-linux-glibc2.12-x86_64.tar.xz
mv mysql-8.0.28-linux-glibc2.12-x86_64 mysql
# strip 版本
tar xf mysql-8.0.28-linux-glibc2.17-x86_64-minimal.tar.xz
mv mysql-8.0.28-linux-glibc2.17-x86_64-minimal mysql
```
- 创建三个实例的目录