For some VPS, the system defaults to install MySQL. We need to uninstall (remove) The default MySQL from our server, VPS. So how (how) to uninstall MySQL on the Ubuntu\debian?
Typically, the following MySQL packages are installed in Debian, Ubuntu:
- Mysql-client-the latest version of MySQL database client (the latest version of the MySQL DB clients).
- Mysql-server-the Latest version of MySQL database server. (Latest version of MySQL database server)
- Mysql-common-mysql database Common Files (MySQL db command file)
So how do I uninstall MySQL on the Ubuntu\debian?
You only need to use the Apt-get command, such as the following command, while uninstalling the MySQL server and MySQL client in ubuntu \ Debian:
sudo apt-get--purge remove mysql-client mysql-server mysql-common
sudo apt-get autoremove
Explanation:--purge removes the given package and configuration file
Remove indicates uninstall package
Autoremove indicates that the software package is automatically uninstalled and dependent on the package (package)
Enter the following (note package name):
Reading Package Lists ... Done building Dependency The Reading state information ... Done the following packages were automatically installed and are no longer required:linux-headers-3.2.0-31-virtual Linux
-headers-3.2.0-31 use ' Apt-get autoremove ' to remove them. The following packages would be removed:libdbd-mysql-perl* libmysqlclient18* mysql-client* mysql-client-5.5* Mysql-commo
N mysql-server* mysql-server-5.5* 0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
After this operation, 67.5 MB disk spaces would be freed. Do your want to continue [y/n]? Y (Reading database ...)
105097 files and directories currently installed.)
Removing mysql-server ...
Removing mysql-server-5.5 ... mysql stop/waiting purging configuration files for mysql-server-5.5 ...
Removing mysql-client ...
Removing mysql-client-5.5 ...
Removing Libdbd-mysql-perl ...
Removing libmysqlclient18 ...
Purging configuration files for libmysqlclient18 ...
Removing Mysql-common ... Purging Configuration FilesFor Mysql-common ... dpkg:warning:while removing mysql-common, directory '/etc/mysql ' not empty and so not removed.
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Processing triggers for libc-bin ... ldconfig deferred processing now taking place
Delete the/etc/mysql directory, using the following command:
Explanation:-R deletes all subdirectories in the directory at the same time. -F indicates forced deletion