脚本以及文件说明

This commit is contained in:
2022-04-14 14:06:49 +08:00
parent 768a1ad5b5
commit 5846e5be34
2 changed files with 8 additions and 7 deletions

View File

@@ -3,12 +3,12 @@
### 脚本描述
```
使用 yum 安装 MySQL8.0 并启动
centos8 使用 yum 安装 MySQL8.0 并启动
```
### 脚本内容
[mysql80-yum-install.sh](mysql57-yum-install.sh)
[mysql80-yum-install.sh](mysql80-yum-install.sh)
```shell
#!/bin/bash
@@ -18,7 +18,6 @@ GREENCOLOR='\033[1;32m'
NC='\033[0m'
DOWNLOAD_DIR="/usr/src"
# MySQL 安装源的位置
SOURCE_DIR="http://repo.mysql.com/mysql80-community-release-el8-3.noarch.rpm"
echo "===================================================="
@@ -35,9 +34,10 @@ wget $SOURCE_DIR
# 安装 MySQL 的 yum 源
rpm -ivh mysql80-community-release-el8-3.noarch.rpm
# 安装 MySQL
yum -y install mysql-community-server
yum -y install mysql-server
# 启动 MySQL
service mysqld start
systemctl start mysqld
systemctl status mysqld
echo "===================================================="
printf "${GREENCOLOR} MySQL's install finish ${NC} \n"

View File

@@ -21,9 +21,10 @@ wget $SOURCE_DIR
# 安装 MySQL 的 yum 源
rpm -ivh mysql80-community-release-el8-3.noarch.rpm
# 安装 MySQL
yum -y install mysql-community-server
yum -y install mysql-server
# 启动 MySQL
service mysqld start
systemctl start mysqld
systemctl status mysqld
echo "===================================================="
printf "${GREENCOLOR} MySQL's install finish ${NC} \n"