我在 Ubuntu 15.04 上使用 MySQL 没有任何错误。但是昨天我从昨天的 15.04(15.04 到 15.10 和 15.10 到 16.04LTS)升级到 16.04LTS。我现在有一些问题
当我使用检查 MySQL 状态时
mysqladmin -u root -p status
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
mysqladmin: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
mysqladmin: [ERROR] Fatal error in defaults handling. Program aborted!
Run Code Online (Sandbox Code Playgroud)
所以我尝试使用删除它
sudo apt-get remove --purge mysql-server mysql-client mysql-common
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dbconfig-mysql : Depends: mysql-client but it is not going to be installed or
mariadb-client but it is not going to be installed or
virtual-mysql-client
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Run Code Online (Sandbox Code Playgroud)
由于我是 Ubuntu 的新手,任何人都可以帮助我解决这种情况吗?提前致谢
小智 8
对我来说,这看起来像是一个依赖问题,所以你可以试试这个:
apt-get autoremove
apt-get remove --purge mysql*
apt-get autoclean
deluser mysql
rm -rf /var/log/mysql
rm -rf /var/lib/mysql
rm -rf /etc/mysql
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助!