Mysql 在 Ubuntu 20.04 中無法啟動

Mysql 在 Ubuntu 20.04 中無法啟動

進行一些系統更新後,我的 mysql 伺服器在 PC 重新啟動後無法啟動。

輸出Mysql -V

mysql  Ver 14.14 Distrib 5.7.31, for Linux (x86_64) using  EditLine wrapper

輸出mysql -u root

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

輸出sudo systemctl status mysql.service

     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2020-08-11 12:04:44 UTC; 26min ago

srp 11 12:04:44 lukas-PC systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5. 
srp 11 12:04:44 lukas-PC systemd[1]: Stopped MySQL Community Server. 
srp 11 12:04:44 lukas-PC systemd[1]: mysql.service: Start request repeated too quickly. 
srp 11 12:04:44 lukas-PC systemd[1]: mysql.service: Failed with result 'exit-code'. 
srp 11 12:04:44 lukas-PC systemd[1]: Failed to start MySQL Community Server. 
srp 11 12:05:17 lukas-PC systemd[1]: /lib/systemd/system/mysql.service:37: PIDFile= references a path below legacy directory /var/run/, updating /var/run/mysqld/my

我是否需要重新安裝 mysql-server 或有什麼方法可以修復 mysql 安裝?謝謝

相關內容