Error “No package mysql-server available” while Installing mysql


Mysql is a popular open source relational database management system (RDBMS). It is widely used and powering many popular websites/applications. Let us see how to install mysql-server on a Centos Server. On a fresh Centos Box, I tried to install “mysql-server” using yum . But following error was thrown

Yum says its not able to find the package “mysql-server” in any of the available yum repositories. In order to fix this, we need to install the mysql yum repositories. Let us see how to do it.

How to enable mysql yum repository on Centos 6/7 ?

On Centos7, using

For Centos 6

Now we can install mysql-server using yum

As you can see, mysql server and client packages are installed.

To start mysql service,

On centos7

On Centos6

Verify “mysql-server” is listening on port 3306 , using

Now you can connect to mysql-server using “mysql” client

Now we can run the mysql queries on mysql prompt. Please let us know incase you find any issue.

Leave a Reply

Your email address will not be published. Required fields are marked *