問題背景
Centos7 安裝Mysql 8后啟動時(shí)遇到的問題,看了好幾個(gè)博客方案無效,搞了半小時(shí)才找到正解,在此次進(jìn)行記錄。
在此假設(shè)你已經(jīng)修改了對應(yīng)目錄的權(quán)限,比如配置的mysql data目錄初始化后已經(jīng)執(zhí)行了chown -R mysql:mysql /XXX/data
問題呈現(xiàn)
啟動失敗后systemctl status mysqld
查看狀態(tài)如下
查看啟動日志信息 /var/log/mysqld.log 如下
2023-10-20T06:23:20.320468Z 0 [Warning] [MY-010091] [Server] Can't create test file /data/mysql/data/mysqld_tmp_file_case_insensitive_test.lower-test
2023-10-20T06:23:20.320513Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.34) starting as process 13397
2023-10-20T06:23:20.323497Z 0 [Warning] [MY-010091] [Server] Can't create test file /data/mysql/data/mysqld_tmp_file_case_insensitive_test.lower-test
2023-10-20T06:23:20.323513Z 0 [Warning] [MY-010091] [Server] Can't create test file /data/mysql/data/mysqld_tmp_file_case_insensitive_test.lower-test
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2023-10-20T06:23:20.324136Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-10-20T06:23:20.324361Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.34) MySQL Community Server - GPL.
解決方案
參考這篇博客:https://www.cnblogs.com/shanxia0812/p/14536755.html,
執(zhí)行
selinux 0
臨時(shí)關(guān)閉linux安全子系統(tǒng),修改/etc/selinux/config文件中設(shè)置SELINUX=disabled,然后重啟或等待下次重啟
問題解決文章來源:http://www.zghlxwxcb.cn/news/detail-722719.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-722719.html
到了這里,關(guān)于mysqld: File ‘./binlog.index‘ not found (OS errno 13 - Permission denied) 問題解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!