Reprinted from: https://www.2cto.com/os/201408/329502.html
Install MySQL
- Execute the following command: sudo apt-get install Mysql-server
2. After continuing, you need to set the MySQL password
3. Enter the password again.
4. Installation is successful, enter Mysql-u root-p to login
MySQL is ready to use here.
Uninstall MySQL
1. sudo apt-get autoremove--purge mysql-server-5.5, uninstall according to your own installed version
2. The following commands are also encountered when checking online:
-
- sudo apt-get remove Mysql-server
- sudo apt-get autoremove mysql-server
- sudo apt-get remove Mysql-common (very important)
When I take the first step, and then execute the three, these are no longer there.
3. Clean up residual data
Dpkg-l |grep ^rc|awk ' {print $} ' |sudo Xargs dpkg-p
But the following happens after execution
Online check, if the above error, prove that your system has no residual configuration files, no need to worry about.
So it takes only one step to complete the uninstall task!
Installation and uninstallation of MySQL under Ubuntu14.04