mysql - Mysql 不会在 Ubuntu 服务器 16.04 上启动或重新启动
问题描述
嗨,当我尝试重新启动 mySQL 时,我已经使用 ubuntu 服务器 16.04 创建了一个虚拟机,我收到以下错误 mysql.service 的作业失败,因为控制进程退出并显示错误代码。
systemctl status mysql.service 报错
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-post) (Result: exit-code) since Thu 2019-05-30 22:31:32 SAST; 28s ago
Process: 11476 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 11467 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 11476 (code=exited, status=1/FAILURE); : 11477 (mysql-systemd-s)
Tasks: 2
Memory: 320.0K
CPU: 850ms
CGroup: /system.slice/mysql.service
└─control
├─11477 /bin/bash /usr/share/mysql/mysql-systemd-start post
└─11564 sleep 1
May 30 22:31:32 richardchristiaan systemd[1]: Starting MySQL Community Server...
May 30 22:31:35 richardchristiaan systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
journalctl -xe 错误代码
-- Unit mysql.service has finished shutting down.
May 30 22:33:35 richardchristiaan systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
May 30 22:33:35 richardchristiaan audit[11888]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11888/status" pid=11888 comm="mysqld" requ
May 30 22:33:35 richardchristiaan audit[11888]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=11888 comm="mysql
May 30 22:33:35 richardchristiaan audit[11888]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11888/status" pid=11888 comm="mysqld" requ
May 30 22:33:35 richardchristiaan kernel: audit: type=1400 audit(1559248415.878:322): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11888/st
May 30 22:33:35 richardchristiaan kernel: audit: type=1400 audit(1559248415.878:323): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/s
May 30 22:33:35 richardchristiaan kernel: audit: type=1400 audit(1559248415.878:324): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11888/st
May 30 22:33:38 richardchristiaan systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
May 30 22:34:06 richardchristiaan systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
May 30 22:34:06 richardchristiaan systemd[1]: mysql.service: Unit entered failed state.
May 30 22:34:06 richardchristiaan systemd[1]: mysql.service: Failed with result 'exit-code'.
May 30 22:34:06 richardchristiaan systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 30 22:34:06 richardchristiaan systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
May 30 22:34:06 richardchristiaan systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
May 30 22:34:06 richardchristiaan audit[11991]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11991/status" pid=11991 comm="mysqld" requ
May 30 22:34:06 richardchristiaan audit[11991]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=11991 comm="mysql
May 30 22:34:06 richardchristiaan audit[11991]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11991/status" pid=11991 comm="mysqld" requ
May 30 22:34:06 richardchristiaan kernel: audit: type=1400 audit(1559248446.611:325): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11991/st
May 30 22:34:06 richardchristiaan kernel: audit: type=1400 audit(1559248446.611:326): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/s
May 30 22:34:06 richardchristiaan kernel: audit: type=1400 audit(1559248446.611:327): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11991/st
May 30 22:34:08 richardchristiaan systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
这是我第一次使用 ubuntu,所以任何帮助将不胜感激
解决方案
推荐阅读
- swift - 当呈现给具有 webview 的视图控制器时不显示警报
- python - Save the pdf using the selenium webdriver in python
- sql - Oracle SQL : Grant View only access to a user A for accessing procedure and function definition of other user B
- docker - node canvas on alpine within docker
- go - 如何在 Elixir Phoenix 应用程序中包含和执行 Go
- node.js - 示例代码在本地机器上完美运行,但不运行 aws-coloud9 IDE 预览浏览器
- sql-server - 如何在 ASP.Net Web API 中调用动态(SELECT)存储过程
- python - 如何在 TensorFlow 中添加 dropout 层?以及如何在 python 3.x 中增加 Numpy 数组?
- image-processing - 模型的输入是否需要梯度?
- java - 如何处理android studio中的“应用程序已停止”问题