• 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、

  • 相关阅读:
    Linux下设置svn开机自启动
    LNMP 如何安装mongodb ----lnmp一键安装包之后
    MySQL表类型MyISAM/InnoDB的区别(解决事务不回滚的问题)
    PHP处理MySQL事务代码
    php redis 秒杀demo
    PHP5.6版本安装redis扩展
    Jzoj5662 尺树寸泓
    Jzoj3351 神牛养成计划2
    Jzoj5622 table
    Jzoj5608 Subset
  • 原文地址:https://www.cnblogs.com/dj0325/p/9867681.html
Copyright © 2020-2023  润新知