Question

Can't install mysql on CentOS 7

It just says no package mysql-server available. I’ve tried every tutorial, egel and whatnot installed. It’s not on the list of things that are not supposed to be installed. Is there a way to force install it from somewhere that’s not from the fastest mirrors so I can see if the mirrors just aren’t working?

edit - I can install mysql-devel, just not anything else.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Don’t forget to set it up as a service. This is from the tutorial @Omar posted.

sudo yum -y install mariadb-server mariadb
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Once you do that, you should be able to run the mysql command and it will just let you in.

[vagrant@default ~]$ mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.37-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

So… you’ll probably want to secure it:

mysql_secure_installation

MariaDB is shipped in the CentOS repo as of CentOS 7 instead of mysql. if you still want to install mysql you need to add mysql rpm dependency into your yum repo.

check this tutorial out of how to install mysql 5.6 in CentOS7 :

How to install latest mysql 5.6 on CentOS7

We use Centos 7 and have found Percona to meet our needs quite well whether we need a single server or a cluster.

Install Percona XtraDB Cluster on Centos 7