CentOS7安装mysql提示“No package mysql-server available.”

时间:2022-06-21 14:14:50

针对centos7安装mysql,提示“No package mysql-server available.”错误,解决方法如下:

Centos 7 comes with MariaDB instead of MySQL. MariaDb is a open source equivalent to MySQL and can be installed with yum -y install mariadb-server mariadb. If you must have mysql you need to add the mysql-community repo sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm and then you can install MySQLl like you normally do

(1)CentOS7带有MariaDB而不是MySQL,MariaDB和MySQL一样也是开元的数据库,您可以使用yum -y install mariadb-server mariadb命令安装

(2)如果必须要安装MySQL,首先必须添加mysql社区repo通过输入命令:sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm,最后使用像安装MySQL的常规方法一样安装mysql: yum install mysql mysql-server mysql-libs mysql-server

转自http://blog.csdn.net/lixiang987654321/article/details/53134162