CentOS7上mysql啟動失敗

CentOS7上mysql啟動失敗

我在我的伺服器上安裝了mysql。但未能啟動。

錯誤顯示在這裡:

systemctl 狀態 mysqld.service 資訊:

[root@localhost run]# systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Sat 2021-05-29 10:47:55 CST; 35s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 256566 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=217/USER)

May 29 10:47:55 localhost.localdomain systemd[1]: Failed to start MySQL Server.
May 29 10:47:55 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
May 29 10:47:55 localhost.localdomain systemd[1]: mysqld.service failed.
May 29 10:47:55 localhost.localdomain systemd[1]: mysqld.service holdoff time over, sche...t.
May 29 10:47:55 localhost.localdomain systemd[1]: Stopped MySQL Server.
May 29 10:47:55 localhost.localdomain systemd[1]: start request repeated too quickly for...ce
May 29 10:47:55 localhost.localdomain systemd[1]: Failed to start MySQL Server.
May 29 10:47:55 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
May 29 10:47:55 localhost.localdomain systemd[1]: mysqld.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

資訊journalctl -xe:

May 29 10:48:00 localhost.localdomain postfix/master[21438]: warning: process /usr/libexec/postfix/pickup pid 257074 exit status 127
May 29 10:48:00 localhost.localdomain postfix/master[21438]: warning: /usr/libexec/postfix/pickup: bad command startup -- throttling
May 29 10:49:00 localhost.localdomain postfix/master[21438]: warning: process /usr/libexec/postfix/pickup pid 263057 exit status 127
May 29 10:49:00 localhost.localdomain postfix/master[21438]: warning: /usr/libexec/postfix/pickup: bad command startup -- throttling
May 29 10:50:00 localhost.localdomain postfix/master[21438]: warning: process /usr/libexec/postfix/pickup pid 269083 exit status 127
May 29 10:50:00 localhost.localdomain postfix/master[21438]: warning: /usr/libexec/postfix/pickup: bad command startup -- throttling
May 29 10:50:01 localhost.localdomain systemd[1]: Started Session 2986 of user root.
-- Subject: Unit session-2986.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit session-2986.scope has finished starting up.
-- 
-- The start-up result is done.

我嘗試運行chown -R mysql:mysql /var/lib/mysql,它顯示如下:

chown: invalid user: ‘mysql:mysql’

我怎麼才能啟動mysql?

相關內容