unbuntu下彻底卸载mysql:
apt-get autoremove --purge mysql-server
apt-get remove mysql-server
apt-get remove mysql-client
apt-get remove mysql-common
最后清楚残留数据(important!!!):
dpkg -l | grep ^rc|awk '{print $2}'|xargs dpkg -P
如果在卸载过程中出现如下错误:
sub-process /usr/bin/dpkg returned an error code(1)
apt-get autoremove --purge mysql-server
apt-get remove mysql-server
apt-get remove mysql-client
apt-get remove mysql-common
最后清楚残留数据(important!!!):
dpkg -l | grep ^rc|awk '{print $2}'|xargs dpkg -P
如果在卸载过程中出现如下错误:
sub-process /usr/bin/dpkg returned an error code(1)
通过删除/var/lib/dpkg/info下所有与mysql相关的文件解决:
cd /var/lib/dpkg/info
rm -rf mysql*然后重新卸载