CentOS 7 - MySQL server setup

NOTE: Normally it is recommended to install MariaDB server instead of classic MySQL server !!

# systemctl stop mariadb
# systemctl disable mariadb
# yum remove mariadb-server mariadb mariadb-libs

! consider consequences of following:
# rm- rf /var/lib/mysql

# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# vim /etc/yum.repos.d/mysql-community.repo

make sure you have enabled correct repo for the version you want, by default it  is 5.6

# yum install mysql-server
# systemctl start mysqld
# systemctl enable mysqld
# mysql_secure_installation