Home > Database > Mysql Tutorial > body text

What is the difference between installing mysql under centos7 and linux?

一个新手
Release: 2017-09-08 10:57:53
Original
1593 people have browsed it

MySQL was installed for a day today, and it was finally installed after get off work in the evening. Various errors were reported all the time.
The reason why I keep reporting errors is actually because centos7 is just a series of linux, and linux is a large category. I searched for ways to install mysql through linux, and found many installation methods that were not suitable for me, mainly Reporting this error

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Copy after login

In fact, when I saw this error, mysql had already been installed, but it was just caused by an access permission issue.
Just execute:

chown -R mysql:mysql /var/lib/mysql
Copy after login

Then restart and it will be ok.
The specific installation process is as follows
1. Download the yum source

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
Copy after login

2. Installation

sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
Copy after login

After executing this step, the installation is actually completed. If you encounter the above For permission issues, just install my solution to solve it.

The above is the detailed content of What is the difference between installing mysql under centos7 and linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!