MySQL..Manager of pid-file quit without updating file

| | Comments (1)

若啟動 MySQL 時遇到上述訊息, 很可能是被 SELinux denied
egrep "denied.*mysqld" /var/log/audit/audit.log
若有結果, 就是被 SELinux denied

最簡單的做法是把 SELinux disable
echo 0 > /selinux/enforce
再編輯 /etc/selinux/config, SELINUX=disabled

若不想把 SELinux disable, 需把 allow rule 加入
> /var/log/audit/audit.log (先把 audit.log 清空)
/etc/init.d/mysql start (啟動 MySQL, 此時會有一些 log 存入 audit.log)
audit2allow -a -M mysqld (用 audit2allow 根據 audit.log 產生 rule, 並建立模組)
semodule -i mysqld.pp (載入 mysqld.pp 模組)
再啟動 MySQL, 若還是無法啟動, 再重複 audit2allow, semodule 的動作

ref. 小州的 SELinux 管理配置 (PDF) | Albert's SELinux 設定範例 | MacBlog3: 關於 SELinux

1 Comments

呵呵 :)
有機會也想要說說這個進階的功能活動

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on January 30, 2009 1:02 AM.

M-Lab was the previous entry in this blog.

Ad-Aware Anniversary Edition 8.0 Free is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.