从 18.04 升级到 22.04 后安装最新的 mysql 服务器时出现权限问题

从 18.04 升级到 22.04 后安装最新的 mysql 服务器时出现权限问题

我无法在本地计算机上安装最新的 mysql 服务器。升级前一切都运行良好(nginx/phpmyadmin 等),但升级过程中似乎删除了一些东西(也许我不应该使用 autoremove 命令),所以我决定如果缺少某些东西,就重新安装,但 mysql 服务器无法做到这一点。

升级或安装过程中均会失败。

sudo apt install mysql-server

终端:

Setting up mysql-server-8.0 (8.0.35-0ubuntu0.22.04.1) ... Renaming removed key_buffer and myisam-recover options (if present) Cannot stat file /proc/4090/fd/4: Permission denied Cannot stat file /proc/4090/fd/5: Permission denied Cannot stat file /proc/4090/fd/6: Permission denied Cannot stat file /proc/4090/fd/7: Permission denied Cannot stat file /proc/4090/fd/8: Permission denied Cannot stat file /proc/4090/fd/9: Permission denied Cannot stat file /proc/4090/fd/10: Permission denied Cannot stat file /proc/4090/fd/11: Permission denied Cannot stat file /proc/4090/fd/12: Permission denied Cannot stat file /proc/4090/fd/13: Permission denied Cannot stat file /proc/4090/fd/14: Permission denied Cannot stat file /proc/4090/fd/15: Permission denied Cannot stat file /proc/4090/fd/16: Permission denied Cannot stat file /proc/4090/fd/17: Permission denied Cannot stat file /proc/4090/fd/18: Permission denied Cannot stat file /proc/4090/fd/19: Permission denied Cannot stat file /proc/4090/fd/20: Permission denied Cannot stat file /proc/4090/fd/21: Permission denied Cannot stat file /proc/4090/fd/22: Permission denied Cannot stat file /proc/4090/fd/23: Permission denied Cannot stat file /proc/4090/fd/24: Permission denied Cannot stat file /proc/4090/fd/25: Permission denied Cannot stat file /proc/4090/fd/26: Permission denied Cannot stat file /proc/4090/fd/27: Permission denied Cannot stat file /proc/4090/fd/28: Permission denied Cannot stat file /proc/4090/fd/29: Permission denied Cannot stat file /proc/4090/fd/30: Permission denied Cannot stat file /proc/4090/fd/31: Permission denied Cannot stat file /proc/4090/fd/32: Permission denied Cannot stat file /proc/4090/fd/33: Permission denied Cannot stat file /proc/4090/fd/34: Permission denied Cannot stat file /proc/4090/fd/35: Permission denied Cannot stat file /proc/4090/fd/36: Permission denied Cannot stat file /proc/4090/fd/37: Permission denied Cannot stat file /proc/4090/fd/38: Permission denied Cannot stat file /proc/4090/fd/39: Permission denied Cannot stat file /proc/4090/fd/40: Permission denied Cannot stat file /proc/4090/fd/41: Permission denied Cannot stat file /proc/4090/fd/42: Permission denied Cannot stat file /proc/4090/fd/43: Permission denied Cannot stat file /proc/4090/fd/1023: Permission denied mysqld will log errors to /var/log/mysql/error.log 2023-12-28T13:01:54.636853Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log. Warning: Unable to start the server.

错误日志:

2023-12-28T13:01:40.717530Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-0ubuntu0.22.04.1) (Ubuntu).

2023-12-28T13:01:41.366417Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.35-0ubuntu0.22.04.1) starting as process 76570

2023-12-28T13:01:41.378633Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2023-12-28T13:01:41.756148Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2023-12-28T13:01:42.736322Z 4 [System] [MY-013381] [Server] Server upgrade from '50700' to '80035' started.

2023-12-28T13:01:54.633654Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'PREPARE stmt FROM @str; ' failed with error code = 130, error message = 'Incorrect file format 'db''.

2023-12-28T13:01:54.636731Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.

2023-12-28T13:01:54.636750Z 0 [ERROR] [MY-010119] [Server] Aborting

知道如何修复吗?它指出表“db”格式不正确。那是什么表?

谢谢您提供的任何信息。我​​会非常感激。干杯。

答案1

已经解决了。您需要删除与 mysql-server 相关的所有内容。清除是不够的。您还需要手动删除相关文件夹等。

相关内容