centos 7
#一键安装 mysql 5.6 yum install -y http://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64/mysql-community-release-el7-5.noarch.rpm yum install -y mysql-server #一键安装 mysql 5.7 yum install -y http://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql57-community-release-el7-10.noarch.rpm yum install -y mysql-server ps:注意安装后的默认密码 #一键安装 mysql 8 http://repo.mysql.com/yum/mysql-8.0-community/el/7/x86_64/mysql80-community-release-el7-2.noarch.rpm yum install -y mysql-server
centos 6
跟centos通理,只是需要将el/7 -->改为el/6即可
#一键安装 mysql 5.6 yum install -y http://repo.mysql.com/yum/mysql-5.6-community/el/6/x86_64/mysql-community-release-el7-5.noarch.rpm yum install -y mysql-server #一键安装 mysql 5.7 yum install -y http://repo.mysql.com/yum/mysql-5.7-community/el/6/x86_64/mysql57-community-release-el7-10.noarch.rpm yum install -y mysql-server ps:注意安装后的默认密码 #一键安装 mysql 8 http://repo.mysql.com/yum/mysql-8.0-community/el/6/x86_64/mysql80-community-release-el7-2.noarch.rpm yum install -y mysql-server