mysql与apt-get在ubuntu下卸载和安装

本文给大家分享ubuntu下apt-get安装和彻底卸载mysql的方法,文中提到了安装mysq命令查看mysql是否运行的命令写法,具体内容详情大家通过本文学习吧

1、安装mysql:

udo apt-get install mysql-server  udo apt-get install mysql-client  udo apt-get install php5-mysql(用于连接php和mysql)

查看mysql是否运行

aux | grep mysql

启动命令

/etc/init.d/mysql start

2.删除mysql

按顺序执行以下命令

udo apt-get autoremove --purge mysql-server-5.0  udo apt-get remove mysql-server  udo apt-get autoremove mysql-server  udo apt-get remove mysql-commo

清理残留数据

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

总结

© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享