03 April, 2013

Completely Uninstall MYSQL from Centos and Start from Scratch


1. Uninstall mysql server and clients.
sudo yum list installed | grep mysql
and uninstall all mysql-related packages (with "yum remove")
2. Delete the databases folder.
sudo rm -rf /var/lib/mysql/
3. If you have the remi repo enabled, disable it.
sudo vi /etc/yum.repos.d/remi.repo (and set enabled = 0)
4. Re-install mysql and mysql-server.
sudo yum install mysql
sudo yum install mysql-server
5. Start mysql and run mysql_secure_installation.
sudo service mysqld start
sudo /usr/bin/mysql_secure_installation

0 comments :

Post a Comment