Home > Database > Mysql Tutorial > Ubuntu下彻底卸载MySQL

Ubuntu下彻底卸载MySQL

WBOY
Release: 2016-06-07 17:28:13
Original
975 people have browsed it

今天搞线下服务器灾备测试的时候,用shell操作数据库,不小心将mysql自带的几个库给drop掉了,无奈想重装mysql,靠它自己恢复了,

前言

今天搞线下服务器灾备测试的时候,用shell操作数据库,,不小心将mysql自带的几个库给drop掉了,无奈想重装mysql,靠它自己恢复了,哈哈,windows用户遗留下来的思想作怪啊,记录一下我在Ubuntu下彻底删除mysql的操作

删除mysql

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

2.sudo apt-get remove mysql-common

清理残留数据

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

重新安装mysql

1.sudo apt-get install mysql-server

2.sudo apt-get install mysql-client

3.sudo apt-get install php5-mysql

linux

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