zoukankan      html  css  js  c++  java
  • ubuntu18.04 mariadb start失败

    在Ubuntu 安装mariadb 再restart 后出现错误

    journalctl -xe

    发现

    apparmor权限问题

    AppArmor 是一款与SeLinux类似的安全框架/工具,其主要作用是控制应用程序的各种权限,例如对某个目录/文件的读/写,对网络端口的打开/读/写等等。

    在Ubuntu下通过命令sudo apparmor_status可以查看当前AppArmor的状态。

    重启apparmor,Apparmor的启动、停止等操作的相关命令如下:

    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权限问题:

    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.)

    但是出现问题

    解决方法:disabled the profile (with aa-disable which seems to be equivalent to plutocrat's solution)

    执行

    sudo aa-disable /usr/sbin/mysqld

    4. sudo service apparmor reload 如果reload无效,则reboot,之后mariadb start well、

  • 相关阅读:
    用Telnet发送HTTP请求
    chrome失去响应问题
    windows应用技巧
    转载:Linux 的系统服务及其配置(略有修改)
    poj2249 排列组合
    poj1068 模拟
    并查集———吉林省赛(六)G题
    著名医生的药方(深搜)
    源代码(C#)
    (课程设计)简单总结
  • 原文地址:https://www.cnblogs.com/dj0325/p/9867681.html
Copyright © 2011-2022 走看看