尝试卸载 percona,因为我破坏了安装。没有成功:
>$ sudo apt remove percona-xtradb-cluster-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
percona-xtradb-cluster-server-5.7
0 upgraded, 0 newly installed, 1 to remove and 23 not upgraded.
1 not fully installed or removed.
After this operation, 104 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 179533 files and directories currently installed.)
Removing percona-xtradb-cluster-server-5.7 (5.7.20-29.24-0ubuntu2) ...
dpkg: error processing package percona-xtradb-cluster-server-5.7 (--remove):
installed percona-xtradb-cluster-server-5.7 package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
percona-xtradb-cluster-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt remove/purge/--force,毫无帮助。
使用 dpkg 删除会产生相同的结果:
sudo dpkg --remove percona-xtradb-cluster-server-5.7
(Reading database ... 179533 files and directories currently installed.)
Removing percona-xtradb-cluster-server-5.7 (5.7.20-29.24-0ubuntu2) ...
dpkg: error processing package percona-xtradb-cluster-server-5.7 (--remove):
installed percona-xtradb-cluster-server-5.7 package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
percona-xtradb-cluster-server-5.7
奇怪的是...我可以毫无问题地启动、停止、重新启动进程:
sudo systemctl status mysql
● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon
Loaded: loaded (/etc/init.d/mysql; generated)
Active: active (exited) since Tue 2018-06-26 00:21:05 CEST; 31min ago
Docs: man:systemd-sysv-generator(8)
Process: 5500 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
lip 26 00:21:05 tkojemile systemd[1]: Starting LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon...
lip 26 00:21:05 tkojemile systemd[1]: Started LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon.
另外,我假设 dpkg-query 显示 - rH (已删除|半安装):
dpkg-query -l percona-xtradb-cluster-server-5.7
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================================-===========================-===========================-===============================================================================================
rH percona-xtradb-cluster-server-5.7 5.7.20-29.24-0ubuntu2 amd64 Percona XtraDB Cluster database server binaries
有人知道如何卸载/重新安装吗?我今天没有选择……提前谢谢!