无法安装/启动 mysql 服务器:无法启动 mysqld 守护程序错误,ubuntu 20.04

无法安装/启动 mysql 服务器:无法启动 mysqld 守护程序错误,ubuntu 20.04

我终于升级到了新的 ubuntu lts 版本,但在它最终工作之前遇到了几个问题(我删除了 python 2.7 以便最终安装它 - 不知道这是否相关,所以以防万一提到它)升级后,mysql 服务器将不再启动。这是我尝试启动服务时显示的内容:

sudo service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

所以我按照它说的做了,结果如下:

mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-04-22 13:56:54 CEST; 3min 40s ago
    Process: 41942 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/S>
    Process: 41950 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 41950 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 13 (Keine Berechtigung)

Apr 22 13:56:54 Eagle1 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Apr 22 13:56:54 Eagle1 systemd[1]: Stopped MySQL Community Server.
Apr 22 13:56:54 Eagle1 systemd[1]: mysql.service: Start request repeated too quickly.
Apr 22 13:56:54 Eagle1 systemd[1]: mysql.service: Failed with result 'exit-code'.
Apr 22 13:56:54 Eagle1 systemd[1]: Failed to start MySQL Community Server.

(我省略了 journalctl,因为当我尝试发布问题时,有人告诉我这看起来像垃圾邮件……)

我还查看了 mysql 错误日志:

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2021-04-22T11:38:01.333568Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2021-04-22T11:38:01.335329Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23-0ubuntu0.20.04.1) starting as process 39829
2021-04-22T11:38:01.350627Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-04-22T11:38:18.418327Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-04-22T11:38:18.419740Z 1 [ERROR] [MY-011014] [Server] Found partially upgraded DD. Aborting upgrade and deleting all DD tables. Start the upgrade process again.
2021-04-22T11:38:29.263168Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-04-22T11:38:29.263780Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-04-22T11:38:31.046567Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23-0ubuntu0.20.04.1)  (Ubuntu).
2021-04-22T11:38:31.772509Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2021-04-22T11:38:31.774516Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23-0ubuntu0.20.04.1) starting as process 40214
2021-04-22T11:38:31.789130Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2021-04-22T11:38:31.789302Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-04-22T11:38:38.740093Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-04-22T11:38:58.298341Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-04-22T11:38:58.298953Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001287 - 'validate password plugin' is deprecated and will be removed in a future release. Please use validate_password component instead
11:39:54 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x55c9e366d370
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fee0238eca0 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x55c9df1c6961]
/usr/sbin/mysqld(handle_fatal_signal+0x31b) [0x55c9ddff1e0b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0) [0x7fee0f2473c0]
/usr/sbin/mysqld(+0x273cca7) [0x55c9df605ca7]
/usr/sbin/mysqld(dict_load_table(char const*, bool, dict_err_ignore_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*)+0x3ee) [0x55c9df60781e]
/usr/sbin/mysqld(dict_table_open_on_name(char const*, unsigned long, unsigned long, dict_err_ignore_t)+0x4c5) [0x55c9df5d3665]
/usr/sbin/mysqld(dd_upgrade_table(THD*, char const*, char const*, dd::Table*, TABLE*)+0xcb5) [0x55c9df627395]
/usr/sbin/mysqld(+0x22e20b7) [0x55c9df1ab0b7]
/usr/sbin/mysqld(dd::upgrade_57::migrate_all_frm_to_dd(THD*, char const*, bool)+0x70e) [0x55c9df1ac64e]
/usr/sbin/mysqld(dd::upgrade_57::fill_dd_and_finalize(THD*)+0x122) [0x55c9df18ff52]
/usr/sbin/mysqld(+0x11e4b08) [0x55c9de0adb08]
/usr/sbin/mysqld(+0x28af8ca) [0x55c9df7788ca]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7fee0f23b609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7fee0e981293]

我不是这方面的专家,尤其不知道堆栈跟踪告诉我什么,但我尝试查看“发现部分升级的 DD”错误,但没有发现与我的问题类似的内容。我尝试安装、重新安装(清除、自动删除、自动清理,基本上是我看到的所有建议),但我甚至无法安装 mysql-server,它总是以错误结束(守护进程无法启动)由于同样的错误,我也无法启动 mysql 服务。install -f 也不起作用,因为再次出现错误。我检查过,Mysql 对 /run/mysql 文件夹确实有 755 个权限。我也尝试过,dpkg --configure -a也导致了类似的错误。我还研究了 apparmor 的事情,因为我看到有人建议在那里添加 mysql,这样它就不会被拒绝,但它已经在那里了。

这时,我的大脑已经崩溃了。有谁知道是什么原因造成的,并能帮我解决吗?

答案1

更改或删除 Ubuntu 的标准 Python 版本是不可恢复的错误。您需要重新安装。

从实时 DVD 或 USB 启动并重新安装。如果您的实时 DVD/USB 与已安装的 Ubuntu 版本相同,您将看到“重新安装”选项。这将以与现有安装相同的设置重新安装系统,而无需格式化分区。这样,您的用户数据和用户配置将被保留。

相关内容