Ubuntu 服务器 20.04-升级到 mysql 8.0 失败

Ubuntu 服务器 20.04-升级到 mysql 8.0 失败

我刚刚在我的 ubuntu 20 服务器上执行了“apt dist-upgrade”,它将 mysql 从 5.7 升级到 8.0,但现在不再起作用了!

Setting up mysql-server-8.0 (8.0.22-0ubuntu0.20.04.2) ...
mysqld will log errors to /var/log/mysql/error.log
2020-11-03T17:13:36.704630Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Job for mysql.service failed because the control process exited with error code.
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: exit-code) since Tue 2020-11-03 18:13:53 CET; 20ms ago
    Process: 1419 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 1419 (code=exited, status=1/FAILURE)
     Status: "Server upgrade complete"
      Error: 2 (No such file or directory)

Nov 03 18:13:53 Socrates systemd[1]: Failed to start MySQL Community Server.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mysql-server-8.0
E: Sub-process /usr/bin/dpkg returned an error code (1)

这些是当前安装的软件包:

ii  dbconfig-mysql                       2.0.13                            all          dbconfig-common MySQL/MariaDB support
ii  libmysqlclient21:amd64               8.0.22-0ubuntu0.20.04.2           amd64        MySQL database client library
ii  mysql-client-8.0                     8.0.22-0ubuntu0.20.04.2           amd64        MySQL database client binaries
ii  mysql-client-core-8.0                8.0.22-0ubuntu0.20.04.2           amd64        MySQL database core client binaries
ii  mysql-common                         5.8+1.0.5ubuntu2                  all          MySQL database common files, e.g. /etc/mysql/my.cnf
ic  mysql-server-5.7                     5.7.31-0ubuntu0.18.04.1           amd64        MySQL database server binaries and system database setup
iF  mysql-server-8.0                     8.0.22-0ubuntu0.20.04.2           amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-8.0                8.0.22-0ubuntu0.20.04.2           amd64        MySQL database server binaries

这是服务状态:

service mysql status
● 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 (start) since Tue 2020-11-03 18:28:24 CET; 13s ago
       Main PID: 4083 (mysqld)
         Status: "Server upgrade in progress"
          Tasks: 28 (limit: 1106)
         Memory: 685.0M
         CGroup: /system.slice/mysql.service
                 └─4083 /usr/sbin/mysqld

我尝试过该门户网站和其他门户网站上建议的几种技巧,但都没有成功。

相关内容