刚刚安装了 ubuntu 22.04,想安装 mysql,运行后得到的结果如下sudo apt install mysql-server
Setting up mysql-server-8.0 (8.0.29-0ubuntu0.22.04.2) ...
Renaming removed key_buffer and myisam-recover options (if present)
Cannot stat file /proc/4983/fd/4: Permission denied
Cannot stat file /proc/4983/fd/5: Permission denied
Cannot stat file /proc/4983/fd/6: Permission denied
Cannot stat file /proc/4983/fd/7: Permission denied
Cannot stat file /proc/4983/fd/8: Permission denied
Cannot stat file /proc/4983/fd/9: Permission denied
Cannot stat file /proc/4983/fd/10: Permission denied
Cannot stat file /proc/4983/fd/11: Permission denied
Cannot stat file /proc/4983/fd/12: Permission denied
Cannot stat file /proc/4983/fd/13: Permission denied
Cannot stat file /proc/4983/fd/14: Permission denied
Cannot stat file /proc/4983/fd/15: Permission denied
Cannot stat file /proc/4983/fd/16: Permission denied
Cannot stat file /proc/4983/fd/17: Permission denied
Cannot stat file /proc/4983/fd/18: Permission denied
Cannot stat file /proc/4983/fd/19: Permission denied
Cannot stat file /proc/4983/fd/20: Permission denied
Cannot stat file /proc/4983/fd/21: Permission denied
Cannot stat file /proc/4983/fd/22: Permission denied
这种情况持续了一段时间,然后出现此错误
mysqld will log errors to /var/log/mysql/error.log
2022-06-09T14:11:01.219514Z 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 -xeu mysql.service" 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 Thu 2022-06-09 16:11:02 CEST; 15ms ago
Process: 39371 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 39379 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 39379 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 22 (Invalid argument)
CPU: 325ms
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
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
Errors were encountered while processing:
mysql-server-8.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试从系统中清除 mysql 并重新安装它,但无法让它工作...有什么想法吗?