mysql-8.0升级到20.04时出现问题

mysql-8.0升级到20.04时出现问题

我正在更新到 Ubuntu 20.04,但 mysql 遇到了问题。我了解不多,所以任何帮助我都非常感谢。

以下是 的输出apt install mysql-server

jesse@nietzsche:~$ sudo apt install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-server is already the newest version (8.0.28-0ubuntu0.20.04.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
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.28-0ubuntu0.20.04.3) ...
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
2022-04-14T00:25:25.317004Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
insserv: warning: script 'K01cinestart' missing LSB tags and overrides
insserv: warning: script 'K01mythtv-backend' missing LSB tags and overrides
insserv: warning: script 'S03powernowd.early' missing LSB tags and overrides
insserv: warning: script 'cinestart' missing LSB tags and overrides
insserv: warning: script 'powernowd.early' missing LSB tags and overrides
insserv: warning: script 'mythtv-backend' missing LSB tags and overrides
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)
     Active: activating (auto-restart) (Result: exit-code) since Wed 2022-04-13 20:25:41 EDT; 4ms ago
    Process: 137731 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 137754 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 137754 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 2 (No such file or directory)
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)

在错误日志中寻找任何线索,我在安装过程中发现以下消息:

2022-04-14T00:28:00.489996Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-04-14T00:28:00.491037Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 138771
2022-04-14T00:28:00.504296Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2022-04-14T00:28:00.504329Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-14T00:28:03.157430Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-14T00:28:05.430738Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2022-04-14T00:28:05.430818Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2022-04-14T00:28:10.206763Z 2 [Warning] [MY-010772] [Server] db.opt file not found for test database. Using default Character set.
2022-04-14T00:28:10.211182Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `b`" or dump/reload to fix it!
2022-04-14T00:28:10.211459Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `a`" or dump/reload to fix it!
2022-04-14T00:28:11.409430Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2022-04-14T00:28:11.409919Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-14T00:28:12.542597Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-04-14T00:28:12.543852Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 138946
2022-04-14T00:28:12.553892Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-14T00:28:12.717657Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:13.717906Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:14.718270Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:15.718681Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:16.719077Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:17.719410Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:18.551168Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-0ubuntu0.20.04.3)  (Ubuntu).
2022-04-14T00:28:21.291600Z 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation.
2022-04-14T00:28:21.291652Z 1 [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified.
2022-04-14T00:28:21.291681Z 1 [ERROR] [MY-012216] [InnoDB] Cannot open datafile for read-only: 'mysql.ibd' OS error: 71
mysqld: Can't open file: 'mysql.ibd' (errno: 0 - )
2022-04-14T00:28:26.294781Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-04-14T00:28:26.294952Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-04-14T00:28:26.295256Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-14T00:28:26.295785Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-0ubuntu0.20.04.3)  (Ubuntu).
2022-04-14T00:28:26.915032Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-04-14T00:28:26.916085Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 139010
2022-04-14T00:28:26.923383Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2022-04-14T00:28:26.923453Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-14T00:28:27.347129Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-14T00:28:32.286610Z 2 [Warning] [MY-010772] [Server] db.opt file not found for test database. Using default Character set.
2022-04-14T00:28:32.291050Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `b`" or dump/reload to fix it!
2022-04-14T00:28:32.291362Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `a`" or dump/reload to fix it!
2022-04-14T00:28:33.363172Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2022-04-14T00:28:33.363565Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-14T00:28:38.646290Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-0ubuntu0.20.04.3)  (Ubuntu).

此后,systemctl status mysql报告如下:

2022-04-14T00:28:00.489996Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-04-14T00:28:00.491037Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 138771
2022-04-14T00:28:00.504296Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2022-04-14T00:28:00.504329Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-14T00:28:03.157430Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-14T00:28:05.430738Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2022-04-14T00:28:05.430818Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2022-04-14T00:28:10.206763Z 2 [Warning] [MY-010772] [Server] db.opt file not found for test database. Using default Character set.
2022-04-14T00:28:10.211182Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `b`" or dump/reload to fix it!
2022-04-14T00:28:10.211459Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `a`" or dump/reload to fix it!
2022-04-14T00:28:11.409430Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2022-04-14T00:28:11.409919Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-14T00:28:12.542597Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-04-14T00:28:12.543852Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 138946
2022-04-14T00:28:12.553892Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-14T00:28:12.717657Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:13.717906Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:14.718270Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:15.718681Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:16.719077Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:17.719410Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-04-14T00:28:18.551168Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-0ubuntu0.20.04.3)  (Ubuntu).
2022-04-14T00:28:21.291600Z 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation.
2022-04-14T00:28:21.291652Z 1 [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified.
2022-04-14T00:28:21.291681Z 1 [ERROR] [MY-012216] [InnoDB] Cannot open datafile for read-only: 'mysql.ibd' OS error: 71
mysqld: Can't open file: 'mysql.ibd' (errno: 0 - )
2022-04-14T00:28:26.294781Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-04-14T00:28:26.294952Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-04-14T00:28:26.295256Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-14T00:28:26.295785Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-0ubuntu0.20.04.3)  (Ubuntu).
2022-04-14T00:28:26.915032Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-04-14T00:28:26.916085Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 139010
2022-04-14T00:28:26.923383Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2022-04-14T00:28:26.923453Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-14T00:28:27.347129Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-14T00:28:32.286610Z 2 [Warning] [MY-010772] [Server] db.opt file not found for test database. Using default Character set.
2022-04-14T00:28:32.291050Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `b`" or dump/reload to fix it!
2022-04-14T00:28:32.291362Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `a`" or dump/reload to fix it!
2022-04-14T00:28:33.363172Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2022-04-14T00:28:33.363565Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-14T00:28:38.646290Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-0ubuntu0.20.04.3)  (Ubuntu).

错误日志继续填充以下消息:

2022-04-14T00:31:30.710096Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2022-04-14T00:31:30.711121Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28-0ubuntu0.20.04.3) starting as process 140131
2022-04-14T00:31:30.718314Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2022-04-14T00:31:30.718372Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-14T00:31:31.944543Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-14T00:31:37.218243Z 2 [Warning] [MY-010772] [Server] db.opt file not found for test database. Using default Character set.
2022-04-14T00:31:37.221850Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `b`" or dump/reload to fix it!
2022-04-14T00:31:37.221965Z 2 [ERROR] [MY-010923] [Server] Table upgrade required. Please do "REPAIR TABLE `a`" or dump/reload to fix it!
2022-04-14T00:31:38.260933Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2022-04-14T00:31:38.261398Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-14T00:31:43.752969Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28-0ubuntu0.20.04.3)  (Ubuntu).

我对此完全一无所知。除了 mythtv 之外,我还有几个几年前写的数据库,我不想以某种方式丢失它们,所以我非常感激您能给我的任何建议。

相关内容