Ubuntu mysql卸载

删除mysql,以5.5为例

1.sudo apt-get autoremove --purge mysql-server-5.5

2.sudo apt-get remove mysql-common

sudo rm -rf /etc/mysql/ /var/lib/mysql #很重要

#清理残留数据
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P 
sudo apt autoremove
sudo apt autoreclean

 启动、关闭服务和查看运行状态

sudo service mysql start
sudo service mysql stop
sudo service mysql status

猜你喜欢

转载自blog.csdn.net/ringsuling/article/details/88547216