Home > Database > Mysql Tutorial > body text

Mysql and apt-get uninstall and install under ubuntu

黄舟
Release: 2017-09-02 13:30:09
Original
1709 people have browsed it

本文给大家分享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)
Copy after login

查看mysql是否运行


aux | grep mysql
Copy after login

启动命令


/etc/init.d/mysql start
Copy after login

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
Copy after login

清理残留数据


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

总结

The above is the detailed content of Mysql and apt-get uninstall and install under ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template