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

ubuntu18.04 mariadb start失败的更多相关文章

  1. ubuntu18.04下挂载网络文件系统失败【学习笔记】

    作者:庄泽彬(欢迎转载,请注明作者) PC:    ubuntu18.04 说明:  之前ubuntu16.04下搭建的环境,开发板挂载网络文件系统是ok的,但是换到ubuntu18.04在启动的时候 ...

  2. ubuntu18.04因java路径原因启动jenkins失败

    我的云服务器ubuntu18.04上本来装了jenkins,今天安装完tomcat后,将原有的openjdk卸载了,安装了jdk8u192, 此时浏览器访问8080端口显示的就是tomcat安装成功的 ...

  3. Ubuntu18.04 LTS x64 构建ARM交叉编译环境(尝试,但失败了!!!估计是编译器没选对)

    [测试而已,由于需要了解编译器和处理器体系,因此先放弃该方法] 动机 入门嵌入式开发,又需要 Windows 又需要 Linux,但资料给的竟然是 Ubuntu9,导致我不能使用 VSCode Rem ...

  4. Ubuntu18.04教程

    pre.ctl { font-family: "Liberation Mono", monospace } h1 { margin-bottom: 0.21cm } h1.west ...

  5. Ubuntu18.04(linux)安装MySQL

    安装 mysql sudo apt-get --purge remove mysql-server mysql-common mysql-client sudo apt-get install mys ...

  6. Ubuntu18.04中安装cuda的记录

    一.参考: https://blog.csdn.net/QLULIBIN/article/details/78714596 https://www.jianshu.com/p/00c37b09f0f3 ...

  7. 在Ubuntu18.04下配置hadoop集群

    服务器准备 启动hadoop最小集群的典型配置是3台服务器, 一台作为Master, NameNode, 两台作为Slave, DataNode. 操作系统使用的Ubuntu18.04 Server, ...

  8. tensorflow/pytorch/mxnet的pip安装,非源代码编译,基于cuda10/cudnn7.4.1/ubuntu18.04.md

    os安装 目前对tensorflow和cuda支持最好的是ubuntu的18.04 ,16.04这种lts,推荐使用18.04版本.非lts的版本一般不推荐. Windows倒是也能用来装深度GPU环 ...

  9. Ubuntu18.04下搭建LAMP环境

    一.Apache2 web 服务器的安装 : 可以先更新一下服务器 1.sudo apt-get update             # 获取最新资源包 2.sudo apt-get upgrade ...

随机推荐

  1. ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock 问题修改

    ubuntu 常见错误–Could not get lock /var/lib/dpkg/lock 通过终端安装程序sudo apt-get install xxx或者apt-get update时出 ...

  2. 深入理解MyBatis的原理(四):映射器的用法

    前言:继续深入学习 mybatis 的用法及原理,还是先会用再学习原理. 映射器的主要元素有:select.insert.update.delete.parameterMap(即将被删除,不建议使用) ...

  3. ASP.NET Core依赖注入

         一.什么是依赖注入(Denpendency Injection) 这也是个老身常谈的问题,到底依赖注入是什么? 为什么要用它? 初学者特别容易对控制反转IOC(Iversion of Con ...

  4. 不同CSS布局实现与文字鼠标选择的可用性——张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=2401 一.文字选择的 ...

  5. Oracle数据库函数总结

    1.ceil()向上取整,结果为124.select ceil(123.123) from dual;2.floor()向下取整,结果为123.select floor(123.123) from d ...

  6. 怎么配置eclipse的联想功能

    第一步:打开Eclipse,windows下,打开“window”→“Preferences” :mac下,打开“偏好设置”. 第二步:选择“Java”,展开,“Editor”,选择“Content ...

  7. LAMP创建

    httpd yum install httpd -y systemctl status httpd systemctl start httpd systemctl stop firewalld Mar ...

  8. zookeeper - java操作

    ZKUtils.java package test; import java.io.IOException; import java.util.concurrent.CountDownLatch; i ...

  9. IIS测试环境搭建

    1.控制面板->程序->程序和功能->打开或关闭Windows功能->Internet信息服务->Web管理工具,打开如下服务: 2.打开IIS管理器 2.1检查.net ...

  10. iPhone 应用开发的5个贴士

    [编者按]本文作者为来自 Redbytes Software 的开发者 James Richard,主要介绍开发 iPhone 应用过程中大有益处的五个贴士.文章系国内 ITOM 管理平台 OneAP ...