我尝试在Google Cloud实例中将PHP 7.0更新到Debian上的7.4,现在MySQL服务器无法工作。
当我尝试更新时,我收到了这个消息:
Failed to start MySQL Community Server.
mysql.service: Unit entered failed state.
mysql.service: Failed with result 'exit-code'.
dpkg: error processing package mysql-community-server (--configure):
subprocess installed post-installation script returned error exit status 1
当我尝试重新启动MySQL服务器时:
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
systemctl status mysql。服务:
●mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-02-13 06:08:00 UTC; 5min ago
Process: 8606 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
Process: 8571 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Failed to start MySQL Community Server.
mysql.service: Unit entered failed state.
mysql.service: Failed with result 'exit-code'.
mysql.service: Service hold-off time over, scheduling restart.
Stopped MySQL Community Server.
mysql.service: Start request repeated too quickly.
Failed to start MySQL Community Server.
mysql.service: Unit entered failed state.
mysql.service: Failed with result 'exit-code'.
这是我用journalctl -xe:
得到的结果Feb 13 06:26:07 spain-en-la-nube-vm sshd[9471]: Received disconnect from 194.5.192.228 port 40696:11: Bye Bye [preauth]
Feb 13 06:26:07 spain-en-la-nube-vm sshd[9471]: Disconnected from 194.5.192.228 port 40696 [preauth]
Feb 13 06:26:07 spain-en-la-nube-vm sshd[9469]: Received disconnect from 81.68.143.165 port 33030:11: Bye Bye [preauth]
Feb 13 06:26:07 spain-en-la-nube-vm sshd[9469]: Disconnected from 81.68.143.165 port 33030 [preauth]
Feb 13 06:26:09 spain-en-la-nube-vm sshd[9463]: Failed password for root from 218.92.0.185 port 39448 ssh2
Feb 13 06:26:10 spain-en-la-nube-vm sshd[9473]: Invalid user csx from 104.248.42.186 port 40838
Feb 13 06:26:10 spain-en-la-nube-vm sshd[9473]: input_userauth_request: invalid user csx [preauth]
Feb 13 06:26:10 spain-en-la-nube-vm sshd[9473]: pam_unix(sshd:auth): check pass; user unknown
Feb 13 06:26:10 spain-en-la-nube-vm sshd[9473]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=104.248.42.186
Feb 13 06:26:12 spain-en-la-nube-vm sshd[9463]: Failed password for root from 218.92.0.185 port 39448 ssh2
Feb 13 06:26:12 spain-en-la-nube-vm sshd[9463]: error: maximum authentication attempts exceeded for root from 218.92.0.185 port 39448 ssh2 [preauth]
Feb 13 06:26:12 spain-en-la-nube-vm sshd[9463]: Disconnecting: Too many authentication failures [preauth]
Feb 13 06:26:12 spain-en-la-nube-vm sshd[9463]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.92.0.185 user=root
Feb 13 06:26:12 spain-en-la-nube-vm sshd[9463]: PAM service(sshd) ignoring max retries; 6 > 3
Feb 13 06:26:13 spain-en-la-nube-vm sshd[9473]: Failed password for invalid user csx from 104.248.42.186 port 40838 ssh2
Feb 13 06:26:13 spain-en-la-nube-vm sshd[9473]: Received disconnect from 104.248.42.186 port 40838:11: Bye Bye [preauth]
Feb 13 06:26:13 spain-en-la-nube-vm sshd[9473]: Disconnected from 104.248.42.186 port 40838 [preauth]
Feb 13 06:26:16 spain-en-la-nube-vm sshd[9475]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.92.0.185 user=root
Feb 13 06:26:18 spain-en-la-nube-vm sshd[9475]: Failed password for root from 218.92.0.185 port 11686 ssh2
Feb 13 06:26:20 spain-en-la-nube-vm sshd[9475]: Received disconnect from 218.92.0.185 port 11686:11: [preauth]
Feb 13 06:26:20 spain-en-la-nube-vm sshd[9475]: Disconnected from 218.92.0.185 port 11686 [preauth]
Feb 13 06:26:24 spain-en-la-nube-vm sshd[9477]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.131.165.85 user=root
Feb 13 06:26:27 spain-en-la-nube-vm sshd[9477]: Failed password for root from 221.131.165.85 port 10496 ssh2
Feb 13 06:26:29 spain-en-la-nube-vm sshd[9477]: Failed password for root from 221.131.165.85 port 10496 ssh2
Feb 13 06:26:32 spain-en-la-nube-vm sshd[9477]: Failed password for root from 221.131.165.85 port 10496 ssh2
Feb 13 06:26:32 spain-en-la-nube-vm sshd[9477]: Received disconnect from 221.131.165.85 port 10496:11: [preauth]
Feb 13 06:26:32 spain-en-la-nube-vm sshd[9477]: Disconnected from 221.131.165.85 port 10496 [preauth]
Feb 13 06:26:32 spain-en-la-nube-vm sshd[9477]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.131.165.85 user=root
Feb 13 06:26:34 spain-en-la-nube-vm sshd[9479]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.131.165.85 user=root
Feb 13 06:26:36 spain-en-la-nube-vm sshd[9479]: Failed password for root from 221.131.165.85 port 49207 ssh2
Feb 13 06:26:38 spain-en-la-nube-vm sshd[9481]: Invalid user sudo1 from 139.210.98.218 port 58261
Feb 13 06:26:38 spain-en-la-nube-vm sshd[9481]: input_userauth_request: invalid user sudo1 [preauth]
Feb 13 06:26:38 spain-en-la-nube-vm sshd[9481]: pam_unix(sshd:auth): check pass; user unknown
Feb 13 06:26:38 spain-en-la-nube-vm sshd[9481]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=139.210.98.218
Feb 13 06:26:39 spain-en-la-nube-vm sshd[9479]: Failed password for root from 221.131.165.85 port 49207 ssh2
Feb 13 06:26:39 spain-en-la-nube-vm sshd[9481]: Failed password for invalid user sudo1 from 139.210.98.218 port 58261 ssh2
Feb 13 06:26:40 spain-en-la-nube-vm sshd[9481]: Received disconnect from 139.210.98.218 port 58261:11: Bye Bye [preauth]
Feb 13 06:26:40 spain-en-la-nube-vm sshd[9481]: Disconnected from 139.210.98.218 port 58261 [preauth]
Feb 13 06:26:42 spain-en-la-nube-vm sshd[9479]: Failed password for root from 221.131.165.85 port 49207 ssh2
Feb 13 06:26:42 spain-en-la-nube-vm sshd[9479]: Received disconnect from 221.131.165.85 port 49207:11: [preauth]
Feb 13 06:26:42 spain-en-la-nube-vm sshd[9479]: Disconnected from 221.131.165.85 port 49207 [preauth]
Feb 13 06:26:42 spain-en-la-nube-vm sshd[9479]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.131.165.85 user=root
Feb 13 06:26:44 spain-en-la-nube-vm sshd[9483]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.131.165.85 user=root
Feb 13 06:26:46 spain-en-la-nube-vm sshd[9483]: Failed password for root from 221.131.165.85 port 55794 ssh2
Feb 13 06:26:48 spain-en-la-nube-vm sshd[9483]: Failed password for root from 221.131.165.85 port 55794 ssh2
Feb 13 06:26:49 spain-en-la-nube-vm sshd[9485]: Invalid user zsd from 61.80.179.118 port 43812
Feb 13 06:26:49 spain-en-la-nube-vm sshd[9485]: input_userauth_request: invalid user zsd [preauth]
Feb 13 06:26:49 spain-en-la-nube-vm sshd[9485]: pam_unix(sshd:auth): check pass; user unknown
Feb 13 06:26:49 spain-en-la-nube-vm sshd[9485]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.80.179.118
似乎有很多尝试登录到MySQL,但这不是问题,问题开始时,我试图更新php的版本。我正在跟随一个解释如何做到这一点的帖子,所以我放了这个命令:
sudo apt update
sudo apt upgrade
和我收到错误,之后MySQL不工作。我已经尝试了所有的解决方案,我发现关于这个问题,但没有一个工作,不知道该怎么做,请如果有人可以帮助我将非常感激。由于
这是版本:Debian GNU/Linux 9.13 (stretch) Release: 9.13
看起来从2017年6月17日之后,Debian在存储库中默认从mysql移动到mariadb,所以似乎你有一个包问题。
我会尝试安装
mariadb-server
包,看看它是否正常工作。我不确定您是否运行了以下命令:
apt -f install
只是想看看他是否抱怨其他的包。