Home>Article>Operation and Maintenance> The mysql service failed to start under centos7

The mysql service failed to start under centos7

王林
王林 Original
2020-04-01 13:53:55 2403browse

The mysql service failed to start under centos7

Cause analysis:

Open the MySQL alarm log, prompting that the pid file cannot be created, as follows:

The mysql service failed to start under centos7

Solution:

Create the /var/run/mysqld/ directory and restart the MySQL service.

[root@spark01 ~]# mkdir -p /var/run/mysqld/ [root@spark01 ~]# /etc/init.d/mysqld start

Note: The owner and group of /var/run/mysqld/ are root. Mysql cannot create files in it. You need to modify the owner and group of the directory.

The mysql service failed to start under centos7

Related tutorial recommendations:centos tutorial

The above is the detailed content of The mysql service failed to start under centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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