19 lines
484 B
Bash
19 lines
484 B
Bash
|
#!/usr/bin/bash
|
|||
|
|
|||
|
#准备MySQL的yum仓库
|
|||
|
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-11.noarch.rpm
|
|||
|
#修改安装版本,启用5.7版本
|
|||
|
yum -y install yum-utils
|
|||
|
yum-config-manager --disable mysql80-community
|
|||
|
yum-config-manager --enable mysql57-community
|
|||
|
#安装
|
|||
|
yum -y install mysql mysql-server
|
|||
|
yum -y install mysql-community-client
|
|||
|
yum -y install mysql-community-server
|
|||
|
#初始化
|
|||
|
systemctl start mysqld
|
|||
|
systemctl enable mysqld
|
|||
|
#修改密码
|
|||
|
|
|||
|
|