Remove MySQL completely from Linux System


Step 1: Uninstall Packages
First we need to uninstall mysql packages using following command.
# yum remove mysql mysql-server
Step 2: Rename MySQL Directory
Now we need to just rename existing mysql directory with other name. We can also delete that directory but rename is better to keep a copy of existing files.
# mv /var/lib/mysql /var/lib/mysql_backup
Step 3: Install MySQL Packages Again
Reinstall MySQL packages again using yum package manager, It will re create /var/lib/mysql directory.
# yum install mysql mysql-server
source

Posting Komentar