I would expect the OS to be cognizant of already installed MySQL packages, but not the files under
yum repository info gets reset with the OS. The best thing that I know of a mysql uninstall is the renaming of
What you could have have done was something like this:
service mysql stop
rpm -qa | grep i mysql
You might see the following output
You would then
rpm -e or
yum uninstall all these packages.
That still won't nix the files for MySQL. What next ?
Move the old datadir aside:
chown -R root:root /var/lib/mysql
mv /var/lib/mysql /var/lib/mysql_old
Now, the old mysql data is out of the way.
If you did not do these things before installing MySQL, a new install of MySQL will not overwrite the previous
/var/lib/mysql. In light of this, I would not expect any OS installations to do this either.
After the OS reinstall, you probably tried to rpm or yum install MySQL again. This won't shove aside
/var/lib/mysql. If you don't want the old
/var/lib/mysql, no worries. Just redo Steps 1-3,