SQL: January 2009 Archives

若啟動 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

About this Archive

This page is an archive of entries in the SQL category from January 2009.

SQL: December 2008 is the previous archive.

SQL: November 2009 is the next archive.

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

Monthly Archives