1. MySql8.0二进制部署
适用于centos系列
1.1下载
https://dev.mysql.com/downloads/mysql/
bash
wget https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.28-linux-glibc2.12-x86_64.tar.xz
wget https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.28-linux-glibc2.12-x86_64.tar.xz
- 安装依赖
bash
yum -y install expect
yum -y install expect
1.2安装
- 创建用户
useradd mysql -r -s /sbin/nologin
useradd mysql -r -s /sbin/nologin
- 解压
bash
tar xf ~/mysql-8.0.28-linux-glibc2.12-x86_64.tar.xz
#创建目录
mkdir /data/apps/ -p
#移动
mv ~/mysql-8.0.28-linux-glibc2.12-x86_64 /data/apps/mysql
tar xf ~/mysql-8.0.28-linux-glibc2.12-x86_64.tar.xz
#创建目录
mkdir /data/apps/ -p
#移动
mv ~/mysql-8.0.28-linux-glibc2.12-x86_64 /data/apps/mysql