繁体   English   中英

损坏的 mysqld 包阻止在 ubuntu 中进行任何其他安装

[英]Broken mysqld package preventing any other installation in ubuntu

我有这个问题很长一段时间,当我想更改我忘记的 mysql 密码时,它开始了。 我已经按照很多文档从我的系统中完全清除了 mysql,以便我可以为新安装的 mysql 设置一个新密码。 但是每次我安装它时我都会遇到同样的问题,它会问我相同的旧密码。

目前我已经从我的系统中清除了 mysql,但是即使每当我尝试安装任何东西时,比如说 openssh,我在下载包后得到以下日志。

sudo apt-get install openssh-server
.    
.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up mysql-server-8.0 (8.0.23-0ubuntu0.20.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 9069
Job for mysql.service failed because a timeout was exceeded.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/mysql.service.d
             └─override.conf
     Active: activating (auto-restart) (Result: timeout) since Sat 2021-07-03 00:35:37 IST; 5ms ago
    Process: 9257 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 9278 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid --skip-grant-tables --skip-networking (code=exited, status=0/SUCCESS)
   Main PID: 9278 (code=exited, status=0/SUCCESS)
     Status: "Server shutdown complete"
      Error: 2 (No such file or directory)

Jul 03 00:35:37 gp-HP-Pavilion-Notebook systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Jul 03 00:35:37 gp-HP-Pavilion-Notebook systemd[1]: Stopped MySQL Community Server.
Jul 03 00:35:37 gp-HP-Pavilion-Notebook systemd[1]: Starting MySQL Community Server...
Jul 03 00:35:41 gp-HP-Pavilion-Notebook systemd[1]: mysql.service: Got notification message from PID 10009, but reception only permitted for main PID 10007
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

每次我安装任何东西时,有什么办法可以防止这种情况发生吗? 如果有人可以帮助解决此问题,那就太好了,因为它还会阻止各种其他软件包的正确安装。

日志说:有关详细信息,请参阅“systemctl status mysql.service”和“journalctl -xe”。

systemctl status mysql.service将显示systemctl status mysql.service的状态。

systemctl stop mysql.service将停止mysql.service。

systemctl start mysql.service将启动mysql.service。

systemctl enable mysql.service将在启动时启动 mysql.service。

systemctl disable mysql.service将在启动时停止 mysql.service 的启动。 (我想你需要这个)

更多信息: man systemctlsystemctl --help

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM