簡體   English   中英

MySQL 無法在 Ubuntu 22.04 啟動

[英]MySQL Cannot start in Ubuntu 22.04

幾天前,我在新安裝的 ubuntu 22.04 中安裝了 LAMP,一切正常。 但是今天當我嘗試啟動 mysql 時,它顯示以下錯誤。

mysql.service - MySQL Community Server
 Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Sun 2022-05-01 09:35:16 IST; 19s ago
Process: 6471 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 6479 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)


Main PID: 6479 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 2 (No such file or directory)
        CPU: 312ms

May 01 09:35:16 g-pc systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
May 01 09:35:16 g-pc systemd[1]: Stopped MySQL Community Server.
May 01 09:35:16 g-pc systemd[1]: mysql.service: Start request repeated too quickly.
May 01 09:35:16 g-pc systemd[1]: mysql.service: Failed with result 'exit-code'.
May 01 09:35:16 g-pc systemd[1]: Failed to start MySQL Community Server.

journalctl 顯示以下內容:

May 01 09:35:16 g-pc systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ Automatic restarting of the unit mysql.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
May 01 09:35:16 g-pc systemd[1]: Stopped MySQL Community Server.
░░ Subject: A stop job for unit mysql.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A stop job for unit mysql.service has finished.
░░ 
░░ The job identifier is 3436 and the job result is done.
May 01 09:35:16 g-pc systemd[1]: mysql.service: Start request repeated too quickly.
May 01 09:35:16 g-pc systemd[1]: mysql.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit mysql.service has entered the 'failed' state with result 'exit-code'.
May 01 09:35:16 g-pc systemd[1]: Failed to start MySQL Community Server.
░░ Subject: A start job for unit mysql.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit mysql.service has finished with a failure.
░░ 
░░ The job identifier is 3436 and the job result is failed.


 

終於在數小時試圖找出問題之后。 這個線程解決了這個問題。 我只是運行命令sudo chown mysql:mysql -R /var/log/mysql 那解決了這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM