![Mysql 在 Ubuntu 20.04 中无法启动](https://linux22.com/image/928427/Mysql%20%E5%9C%A8%20Ubuntu%2020.04%20%E4%B8%AD%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8.png)
在进行一些系统更新后,我的 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 安装?谢谢