mysql服务启动失败 [MY-010091] mysqld: File /binlog.index not found selinux

启动mysql服务失败,提示:

[root@localhost ~]# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2020-06-22T03:05:07.975321Z 0 [Warning] [MY-010091] [Server] Can't create test file /u01/mysql/data/mysqld_tmp_file_case_insensitive_test.lower-test
2020-06-22T03:05:07.975479Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 46140
2020-06-22T03:05:07.980755Z 0 [Warning] [MY-010091] [Server] Can't create test file /u01/mysql/data/mysqld_tmp_file_case_insensitive_test.lower-test
2020-06-22T03:05:07.980777Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /u01/mysql/data/ is case insensitive
2020-06-22T03:05:07.982232Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-06-22T03:05:07.982448Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19)  MySQL Community Server - GPL.
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

仔细一查,原来是selinux惹的祸:

[root@localhost ~]# /usr/sbin/sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive

改了就行了,要想永久生效:vi /etc/sysconfig/selinux。

文章下方是我的微信,欢迎加我。👇

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

姚远Oracle ACE

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值