CentOS offers you no native MySQL package so you need to add it on your own. This you can do by adding a MySQL hosted repository on your Linux System CentOS.
Add the MySQL Yum repository to your system’s repository list. This can be done by installing an RPM that comes with MySQL.
- Go to the Download MySQL Yum Repository page (https://dev.mysql.com/downloads/repo/yum/) in the MySQL Developer Zone
- Select and download the release package for your platform
- Use the yum package manager to install MySQL (yum -y install mysql-server)
- Enable the MySQL Daemon Service, use these commands systemctl start mysql followed by systemctl enable mysql
That’s it. Now you may check and make sure that MySQL is up and running, simply use this command – sudo service mysqld status.