Step by step to install MySQL Server on CentOS 7

MySQL is a powerful, robust SQL database available out there. If you are running CentOS Linux, you can turn your Linux machine into a powerful MySQL Server in a matter of minutes. It is pretty easy to install MySQL Server on CentOS. This tutorial is going to show you how to install MySQL Server on CentOS 7.

Before you install MySQL Server on CentOS 7, you should consider check your host name and also make sure your system is up to date. Use this command to check your system hostname:

hostname
hostname -f

To update, use this line

yum update

Now, we are ready to install MySQL Server on CentOS 7

On Terminal, execute the following commands as root. This will add MySQL repository to your system and install MySQL Server on CentOS 7.

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update

sudo yum install mysql-server
sudo systemctl start mysqld

At this point, if all goes well, you will have MySQL Server installed on your CentOS and also we already start MySQL service with the last command.

Now its time to harden MySQL Installation

sudo mysql_secure_installation

Follow installation shown on your terminal. You will be asked for some questions to secure your MySQL Server.

Thanks for reading this how to install MySQL Server on CentOS 7. Next, I will show you how to manage this MySQL Server.

Admin

Leave a Reply

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