System version centos7.2
Uninstall mariadb
Download rpm form of official website yum yum install warehouse pack again
yum -Y the install mysql80-Community-Release-el7- . 3 package downloaded locally installed .noarch.rpm # LS / etc / yum .repos.d / MySQL-community.repo MySQL-community- source.repo # view more than two a repo file yum -y install yum - utils yum -config-Manager --disable mysql80- Community Community yum -config-Manager --enable mysql57- Community Community yum repolist enabled | grep mysql # View now enabled warehouse in mysql version is not 5.7 the yum install MySQL-community- Server LS After the existence of the directory -d / var / lib / mysql # can be completed
start up
systemctl start mysqld
systemctl enable mysqld
connection
mysql5. 5 without passwords, 5 after starting .6 stored at random password generation / root / directory, 5.7 password stored in the journal. grep ' Temporary password ' / var / log / mysqld.log MySQL -uroot--p " oldpasswork " password " NewPassword "