这与链接的问题不同。这个已经运行多年了,并且仍然安装
我对 Ubuntu 不太熟悉。但我有一台服务器为我的一个客户运行 MySQL 数据库,突然它停止工作了。我重新启动了服务器,问题仍然存在。
当我尝试启动 MySQL 服务器时收到以下消息:
Job for mysql.service failed because the control process exited with error code.
跑步systemctl status mysql.service
# sudo systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-post) (Result: exit-code) since Wed 2018-10-24 15:46:02 CEST; 20s ago
Process: 24864 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 24854 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 24864 (code=exited, status=1/FAILURE); : 24865 (mysql-systemd-s)
Tasks: 2
Memory: 324.0K
CPU: 327ms
CGroup: /system.slice/mysql.service
└─control
├─24865 /bin/bash /usr/share/mysql/mysql-systemd-start post
└─24937 sleep 1
跑步
# sudo systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-post) (Result: exit-code) since Wed 2018-10-24 15:46:02 CEST; 20s ago
Process: 24864 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 24854 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 24864 (code=exited, status=1/FAILURE); : 24865 (mysql-systemd-s)
Tasks: 2
Memory: 324.0K
CPU: 327ms
CGroup: /system.slice/mysql.service
└─control
├─24865 /bin/bash /usr/share/mysql/mysql-systemd-start post
└─24937 sleep 1
Oct 24 15:46:02 <ip-removed> systemd[1]: Starting MySQL Community Server...
Oct 24 15:46:04 <ip-removed> systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
# sudo journalctl -xe
-- Unit mysql.service has finished shutting down.
Oct 24 15:50:36 <ip-removed> 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.
Oct 24 15:50:36 <ip-removed> kernel: audit: type=1400 audit(1540389036.856:1363): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/26027/status" pid=26027 comm="
Oct 24 15:50:36 <ip-removed> kernel: audit: type=1400 audit(1540389036.856:1364): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=26027
Oct 24 15:50:36 <ip-removed> kernel: audit: type=1400 audit(1540389036.856:1365): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/26027/status" pid=26027 comm="
Oct 24 15:50:36 <ip-removed> audit[26027]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/26027/status" pid=26027 comm="mysqld" requested_mask="r" denied_m
Oct 24 15:50:36 <ip-removed> audit[26027]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=26027 comm="mysqld" requested_mask="r" d
Oct 24 15:50:36 <ip-removed> audit[26027]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/26027/status" pid=26027 comm="mysqld" requested_mask="r" denied_m
Oct 24 15:50:38 <ip-removed> systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Oct 24 15:50:44 <ip-removed> sshd[26071]: Invalid user dab from 149.202.149.48
Oct 24 15:50:44 <ip-removed> sshd[26071]: input_userauth_request: invalid user dab [preauth]
Oct 24 15:50:44 <ip-removed> sshd[26071]: pam_unix(sshd:auth): check pass; user unknown
Oct 24 15:50:44 <ip-removed> sshd[26071]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=149.202.149.48
Oct 24 15:50:46 <ip-removed> sshd[26071]: Failed password for invalid user dab from 149.202.149.48 port 35462 ssh2
Oct 24 15:50:46 <ip-removed> sshd[26071]: Received disconnect from 149.202.149.48 port 35462:11: Normal Shutdown, Thank you for playing [preauth]
Oct 24 15:50:46 <ip-removed> sshd[26071]: Disconnected from 149.202.149.48 port 35462 [preauth]
Oct 24 15:50:49 <ip-removed> sudo[26085]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/bin/journalctl -xe
Oct 24 15:50:49 <ip-removed> sudo[26085]: pam_unix(sudo:session): session opened for user root by root(uid=0)
我允许读取被阻止的文件,却发现了另一组错误
-- Unit mysql.service has begun starting up.
Oct 24 18:01:20 vps437776 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Oct 24 18:01:22 vps437776 postfix/smtpd[17615]: connect from unknown[194.53.142.88]
Oct 24 18:01:27 vps437776 saslauthd[1611]: pam_unix(smtp:auth): check pass; user unknown
Oct 24 18:01:27 vps437776 saslauthd[1611]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Oct 24 18:01:30 vps437776 saslauthd[1611]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Oct 24 18:01:30 vps437776 saslauthd[1611]: do_auth : auth failure: [[email protected]] [service=smtp] [realm=ovh.net] [mech=pam] [reason=PAM auth error]
Oct 24 18:01:30 vps437776 postfix/smtpd[17615]: warning: unknown[194.53.142.88]: SASL LOGIN authentication failed: authentication failure
Oct 24 18:01:30 vps437776 postfix/smtpd[17615]: disconnect from unknown[194.53.142.88] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
Oct 24 18:01:34 vps437776 postfix/smtpd[21860]: connect from unknown[194.53.142.89]
Oct 24 18:01:35 vps437776 sshd[23609]: Invalid user operator from 149.202.149.48
Oct 24 18:01:35 vps437776 sshd[23609]: input_userauth_request: invalid user operator [preauth]
Oct 24 18:01:35 vps437776 sshd[23609]: pam_unix(sshd:auth): check pass; user unknown
Oct 24 18:01:35 vps437776 sshd[23609]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=149.202.149.48
Oct 24 18:01:36 vps437776 postfix/smtpd[18999]: connect from unknown[194.53.142.55]
Oct 24 18:01:37 vps437776 sshd[23609]: Failed password for invalid user operator from 149.202.149.48 port 59606 ssh2
Oct 24 18:01:37 vps437776 sshd[23609]: Received disconnect from 149.202.149.48 port 59606:11: Normal Shutdown, Thank you for playing [preauth]
Oct 24 18:01:37 vps437776 sshd[23609]: Disconnected from 149.202.149.48 port 59606 [preauth]
Oct 24 18:01:39 vps437776 saslauthd[1612]: pam_unix(smtp:auth): check pass; user unknown
Oct 24 18:01:39 vps437776 saslauthd[1612]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Oct 24 18:01:40 vps437776 saslauthd[1610]: pam_unix(smtp:auth): check pass; user unknown
Oct 24 18:01:40 vps437776 saslauthd[1610]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Oct 24 18:01:42 vps437776 saslauthd[1612]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Oct 24 18:01:42 vps437776 saslauthd[1612]: do_auth : auth failure: [[email protected]] [service=smtp] [realm=ovh.net] [mech=pam] [reason=PAM auth error]
Oct 24 18:01:42 vps437776 postfix/smtpd[21860]: warning: unknown[194.53.142.89]: SASL LOGIN authentication failed: authentication failure
Oct 24 18:01:42 vps437776 postfix/smtpd[21860]: disconnect from unknown[194.53.142.89] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
Oct 24 18:01:43 vps437776 saslauthd[1610]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Oct 24 18:01:43 vps437776 saslauthd[1610]: do_auth : auth failure: [[email protected]] [service=smtp] [realm=ovh.net] [mech=pam] [reason=PAM auth error]
Oct 24 18:01:43 vps437776 postfix/smtpd[18999]: warning: unknown[194.53.142.55]: SASL LOGIN authentication failed: authentication failure
Oct 24 18:01:44 vps437776 postfix/smtpd[18999]: disconnect from unknown[194.53.142.55] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
Oct 24 18:01:49 vps437776 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.
Oct 24 18:01:49 vps437776 systemd[1]: mysql.service: Unit entered failed state.
Oct 24 18:01:49 vps437776 systemd[1]: mysql.service: Failed with result 'exit-code'.
Oct 24 18:01:49 vps437776 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Oct 24 18:01:49 vps437776 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.
Oct 24 18:01:49 vps437776 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.
Oct 24 18:01:51 vps437776 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Oct 24 18:02:08 vps437776 postfix/smtpd[17615]: connect from unknown[194.53.142.55]
Oct 24 18:02:11 vps437776 sshd[23769]: Invalid user apache from 149.202.149.48
Oct 24 18:02:11 vps437776 sshd[23769]: input_userauth_request: invalid user apache [preauth]
Oct 24 18:02:11 vps437776 sshd[23769]: pam_unix(sshd:auth): check pass; user unknown
Oct 24 18:02:11 vps437776 sshd[23769]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=149.202.149.48
Oct 24 18:02:13 vps437776 sshd[23769]: Failed password for invalid user apache from 149.202.149.48 port 58802 ssh2
Oct 24 18:02:13 vps437776 sshd[23769]: Received disconnect from 149.202.149.48 port 58802:11: Normal Shutdown, Thank you for playing [preauth]
Oct 24 18:02:13 vps437776 sshd[23769]: Disconnected from 149.202.149.48 port 58802 [preauth]
Oct 24 18:02:13 vps437776 saslauthd[1609]: pam_unix(smtp:auth): check pass; user unknown
Oct 24 18:02:13 vps437776 saslauthd[1609]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Oct 24 18:02:15 vps437776 saslauthd[1609]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Oct 24 18:02:15 vps437776 saslauthd[1609]: do_auth : auth failure: [[email protected]] [service=smtp] [realm=ovh.net] [mech=pam] [reason=PAM auth error]
Oct 24 18:02:15 vps437776 postfix/smtpd[17615]: warning: unknown[194.53.142.55]: SASL LOGIN authentication failed: authentication failure
Oct 24 18:02:16 vps437776 postfix/smtpd[17615]: disconnect from unknown[194.53.142.55] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
Oct 24 18:02:17 vps437776 postfix/smtpd[21860]: connect from unknown[194.53.142.88]
Oct 24 18:02:17 vps437776 sudo[23783]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/bin/journalctl -xe
Oct 24 18:02:17 vps437776 sudo[23783]: pam_unix(sudo:session): session opened for user root by root(uid=0)
sudo aa-status | grep 'profile\|process\|mysql'
root@vps437776:~# sudo aa-status | grep 'profile\|process\|mysql'
17 profiles are loaded.
17 profiles are in enforce mode.
/usr/sbin/mysqld
0 profiles are in complain mode.
3 processes have profiles defined.
3 processes are in enforce mode.
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.