CentOS 7 Method of installing mysql5.5 _mysql

Source: Internet
Author: User
Tags centos

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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.