在进行一些系统更新后,我的 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 安装?谢谢