ubuntu18.04 mariadb start失败
在Ubuntu 安裝mariadb 再restart 后出現(xiàn)錯(cuò)誤
journalctl -xe發(fā)現(xiàn)
apparmor權(quán)限問(wèn)題
AppArmor 是一款與SeLinux類似的安全框架/工具,其主要作用是控制應(yīng)用程序的各種權(quán)限,例如對(duì)某個(gè)目錄/文件的讀/寫(xiě),對(duì)網(wǎng)絡(luò)端口的打開(kāi)/讀/寫(xiě)等等。
在Ubuntu下通過(guò)命令sudo apparmor_status可以查看當(dāng)前AppArmor的狀態(tài)。
重啟apparmor,Apparmor的啟動(dòng)、停止等操作的相關(guān)命令如下:
?
Start : sudo /etc/init.d/apparmor start
Stop : sudo /etc/init.d/apparmor stop
reload: sudo /etc/init.d/apparmor reload
Show status: sudo /etc/init.d/apparmor status
解決mysql aparmor權(quán)限問(wèn)題:
1. sudo aa-status?shows you what apparmor is doing; what actually has an enforced policy, versus what's just set to complain.
2. sudo apt-get install apparmor-utils?adds a few commands that make the apparmor profiles easier to deal with, such as...
3.? ?sudo aa-complain /usr/sbin/mysqld?turns the profile from "enforce" to complain. (aa-enforce turns it back.)
但是出現(xiàn)問(wèn)題
解決方法:disabled the profile (with aa-disable which seems to be equivalent to?plutocrat's solution)
執(zhí)行
sudo aa-disable /usr/sbin/mysqld4.?sudo service apparmor reload 如果reload無(wú)效,則reboot,之后mariadb start well、
?
轉(zhuǎn)載于:https://www.cnblogs.com/dj0325/p/9867681.html
總結(jié)
以上是生活随笔為你收集整理的ubuntu18.04 mariadb start失败的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。