JiaoBen/MD/install-mysql.sh

19 lines
484 B
Bash
Raw Normal View History

2024-12-26 09:43:54 +08:00
#!/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
#修改密码