What is CentOS | Configure MySql Server on CentOS

Community Enterprise Operating System (CentOS) is a sharing network of Linux Operating System which can be related with Red Hat Enterprise Linux (RHEL). It is the 100% free operating system distribution based on Linux. CentOS system can provide a free enterprise class computing platform to maintain complete binary compatibility.

Every CentOS system when released is supported for 10 years and there is no other operating system when stay for such long period of time.

Features of CentOS:

  • It can provide High Performance speed.
  • High efficiency as it provides better performance speed.
  • CentOS is one of the many Linux operating systems which will be available for free.
  • User can get the advantage of open source system software by using CentOS.
  • CentOS can work at much faster speed as compare to any other operating system.

Configure MySql Server on CentOS:

When we install CentOS it already include MariaDB as default database. So if we need to configure MySql on CentOS we need to remove MariaDB from CentOS otherwise it generates the error.


file /usr/share/mysql/xxx from install of MySQL-server-xxx conflicts with file from package mariadb-libs-xxx

Use the following command to remove MariaDB from CentOS.


sudo yum remove MariaDB-server

sudo yum remove MariaDB-client (This can be done in single step)

sudo rm –rf /var/lib/mysql

sudo rm /etc/my.cnf


Now you are ready for the installation. Once you have CentOS Up and running.

Step 1 –

Add the useful repository files with the following command.


wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

Step 2 –

Install wget with the following command.


sudo yum install wget.

Step 3 –

After downloading the file install the file with the following command:


sudo rpm -ivh mysql80-community-release-el7-1.noarch.rpm

Step 4 –

Now next step is to install MySql Server by using following command.


sudo yum install mysql-server

Step 5 –

This Installation will take time so be calm, during the installation a random password is created for user login to show it we have to use following command.


less /var/log/mysqld.log


Step 6 –

By using the Random password of the file we can save our file by using the following command.


sudo mysql_secure_installation

Step 7 –

It’s a final step to test our configuration. For the testing we need to type the following command.


mysql -u root –pAfter successful run we have the following screen


Now we are ready to use.


Follow US:

Leave a Reply

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