gpt4 book ai didi

mariadb - mysql : unrecognized service

转载 作者:行者123 更新时间:2023-12-03 16:13:10 26 4
gpt4 key购买 nike

我按照说明here按照以下步骤在 WSL 上安装 mariadb。我运行这个sudo service mysql start我有mysql: unrecognized service知道如何解决这个问题吗?

最佳答案

如您所见,这只是一个简单的问题,但我需要 24 小时才能诊断出问题。
解决方案:
我用这个命令卸载 mariadbsudo apt-get remove --auto-remove mariadb-server并安装 sudo apt install mysql-server相反,但它会导致更多的问题
mysql安装成功但无法启动

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-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
因此,通过删除 mariadb 的 deb 源并清除 mysql-common,然后重新安装它。
做: sudo apt edit-sources并查找包含 mariadb 的任何内容,例如: deb [arch=amd64,arm64,ppc64el] http://ftp.nluug.nl/db/mariadb/repo/10.3/ubuntu bionic main通过放置 # 将其注释掉在它面前。然后运行
sudo apt update
sudo apt purge mysql-common
sudo apt install mysql-common
之后,您可以通过 sudo apt install mysql-server 正确安装 mysql-server,然后执行以下操作:
sudo apt purge mysql-server mysql-server-5.7
sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-5.7 mysql-client-core-5.7


sudo rm -rfv /etc/mysql /var/lib/mysql

sudo apt autoremove

sudo apt autoclean
最后:
sudo apt update    
sudo apt install mysql-server mysql-client --fix-broken --fix-missing
引用:
https://askubuntu.com/questions/980314/cannot-install-mysql-server-in-ubuntu16-0-4
https://askubuntu.com/questions/763534/cannot-reinstall-mysql-server-after-its-purge

关于mariadb - mysql : unrecognized service,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56985500/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com