天天看点

ubuntu18.04卸载mysql数据库

查看mysql的依赖项:

dpkg --list|grep mysql

ubuntu18.04卸载mysql数据库

卸载命令:

sudo apt-get remove mysql-common

ubuntu18.04卸载mysql数据库

卸载命令:

sudo apt-get autoremove --purge mysql-server-5.7

ubuntu18.04卸载mysql数据库

删除残留数据:

dpkg -l|grep ^rc|awk '{print$2}'|sudo xargs dpkg -P

ubuntu18.04卸载mysql数据库

最后,再用第一条命令查询下是否已经完全卸载