First CENTOS7 already does not support MySQL, because the charge you know, so the internal integration of the MARIADB, and the installation of MySQL will and mariadb file conflict, so need to uninstall the 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) is (installed) postfix-2:2.10.1-6.el7.x86_64 required
libmysqlclient.so.18 (libmysqlclient_18) (64bit) is (installed) postfix-2:2.10.1-6.el7.x86_64 required
#强制卸载, because there is no--nodeps
rpm-e--nodeps mariadb-libs-5.5.37-1.el7_0.x86_64
#安装mysql依赖
Yum install vim Libaio net-tools
#安装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 MySQL config file.
#修改响应的配置文件
Vim/etc/my.cnf
#把mysql的data拷贝到制定的目录
mv/var/lib/mysql/home/mysql/data/
Also pay attention to the owner and permissions of the directory.
MySQL startup post: error! The server quit without updating PID file error Resolution
MySQL log: Can ' t find file: './mysql/plugin.frm ' (Errno:13-permission denied)
1, insufficient authority: Chown-r mysql:mysql/home/mysql/data "" Chmod-r 755/home/mysql/data
2, Centos7 selinux problem: Open the/etc/selinux/config, selinux=enforcing changed to selinux=disabled after the disk to restart the machine.
Below see the other netizen's supplement:
1, CentOS under the Yum temporarily did not mysql-server direct installation package;
MARIADB is a branch of MySQL community development and an enhanced alternative;
2. Installation mariadb
Yum-y Install Mariadb-server mariadb mariadb-devel
Systemctl Start mariadb
Systemctl Enable MARIADB
Mysql_secure_installation
Firewall-cmd--permanent--add-service MySQL
Systemctl Restart Firewalld.service
Iptables-l-n|grep 3306
3, log in to the database to see if there is better
Msyql-uroot-p
show databases;