First CENTOS7 already does not support MySQL, because charges you understand, so the internal integration of MARIADB, and install MySQL will and mariadb file conflict, so need to uninstall MARIADB, the following is uninstall MARIADB, install MySQL steps.
#列出所有被安装的rpm Package
Rpm-qa | grep mariadb
#卸载
Rpm-e mariadb-libs-5.5.37-1.el7_0.x86_64
Error: Dependency detection failed:
libmysqlclient.so.18 () (64bit) was (installed) postfix-2:2.10.1-6.el7.x86_64 required
libmysqlclient.so.18 (libmysqlclient_18) (64bit) was (installed) postfix-2:2.10.1-6.el7.x86_64 needed
#强制卸载, because there is no--nodeps
RPM-E--nodeps mariadb-libs-5.5.37-1.el7_0.x86_64
#安装mysql5.5.39 RPM Package
rpm-ivh/home/liwei/mysql-server-5.5.39-2.el6.x86_64.rpm
rpm-ivh/home/liwei/mysql-client-5.5.39-2.el6.x86_64.rpm
#拷贝配置文件
CP/USR/SHARE/MYSQL/MY-MEDIUM.CNF/ETC/MY.CNF, renamed MY.CNF as the MySQL configuration file.
#修改响应的配置文件
Vim /etc/my.cnf
#把mysql的data拷贝到制定的目录
mv/var/lib/mysql/home/mysql/data/
Also pay attention to the owner and permission of the directory.
MySQL Startup report: error! The server quit without updating PID file error problem resolution
1, insufficient authority:chown-r mysql:mysql/home/mysql/data "" Chmod-r 755/home/mysql/data
2, Centos7 selinux problem: open/etc/selinux/config, selinux=enforcing changed to selinux=disabled after save to restart the machine.
CentOS 7 Installation mysql5.5