Featured image of post Uninstalling MySQL from LNMP

Uninstalling MySQL from LNMP

If you want to uninstall MySQL after completing the LNMP installation, you can use the following commands: executing the commands above will uninstall MySQL...

If you want to uninstall MySQL after completing the LNMP installation, you can use the following commands:

1
2
3
4
|  | /etc/init.d/mysql stop |
| --- | --- |
|  | rm -rf /usr/local/mysql |
|  | rm -f /etc/my.cnf |

Executing the commands above will uninstall MySQL. If you want to clean up more thoroughly, you can optionally execute the following commands:

1
2
3
4
5
|  | chkconfig mysql off |
| --- | --- |
|  | chkconfig --del mysql |
|  | update-rc.d -f mysql remove |
|  | rm -f /etc/init.d/mysql |

Please note: Before deleting MySQL, make sure to back up your existing databases.

Licensed under CC BY-NC-SA 4.0