Remove mariadb
yum remove mariadb-server
yum remove mariadb-libs
step to install
yum install wget
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
[root@localhost ~]# ls -1 /etc/yum.repos.d/mysql-community*
/etc/yum.repos.d/mysql-community.repo
/etc/yum.repos.d/mysql-community-source.repo
[root@localhost ~]#
Installing MySQL Server
yum install mysql-server
To start MySQL Service, run command
systemctl start mysqld
To stop MySQL Service, run command
systemctl stop mysqld
To restart MySQL Service, run command
systemctl restart mysqld
To get status of MySQL Service, run command
systemctl status mysqld
Reset MySQL root password
mysql -u root You will see mysql prompt like this mysql> . Use the below given commands to reset root’s password.
mysql> use mysql;
mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit