嗨,我最近在Ubuntu-22.04中启动mysql时遇到了一些问题。当我尝试sudo service mysql start时,会弹出一个错误:
Failed to start mysql.service: Unit mysql.service failed to load properly, please adjust/correct and reload service manager: File exists
See system logs and 'systemctl status mysql.service' for details.我也尝试过一些来自堆栈溢出和其他论坛的“修复”,但是它们似乎都没有起作用,主要是因为自动删除部分。
root@server-HP-Z420-Workstation:~# apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-8.0 (8.0.30-0ubuntu0.22.04.1) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned
error exit status 2
Errors were encountered while processing:
mysql-server-8.0
E: Sub-process /usr/bin/dpkg returned an error code (1)有什么想法吗?
发布于 2022-10-05 22:13:18
尝试卸载并安装服务器,如下所示:
mysql-server-8.0
https://stackoverflow.com/questions/73966024
复制相似问题