技术 · 思考 · 实践 · 成长

首页/MySQL8/正文

[root@localhost ~]# systemctl start mysqld.service Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

MySQL8474 次阅读


[root@localhost ~]# systemctl start mysqld.service

Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.


解决办法:

[root@localhost data]# journalctl -xe

                        Sep 21 17:30:02 localhost.localdomain setroubleshoot[7951]: SELinux is preventing /usr/sbin/mysqld from write 


1、/usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态

SELinux status:                 enabled

2、getenforce                 ##也可以用这个命令检查


1、临时关闭(不用重启机器):

setenforce 0 #设置SELinux 成为permissive模式

#setenforce 1 设置SELinux 成为enforcing模式


2、修改配置文件需要重启机器:

修改/etc/selinux/config 文件

将SELINUX=enforcing改为SELINUX=disabled

重启机器即可


人生于世,就得有点兴致,闲暇之时,或乐游山水、或尽享食味、或寄情岁时,它让我们的生活变得充盈。

评论交流

0 条评论 · 支持多级回复
验证码
暂无评论,来说说你的想法吧

相关文章

继续阅读