Removing mysql with yup ... does it remove the data?

I've looked everywhere, and this seems like a dumb question, but I've become pigeon-holed in a situation here where I need to remove the current mysql and load a new one.

Server: Centos 5.6, kernel. 2.6.18-238.9.1.el5 64BIT

The issue is that MYSQL is loaded, and that causes issues (probably loaded through a 3rd party rpm).

I am trying to load, or compile pure-ftpd so that I can use the mysql connection to control user accounts.

Pure-ftp is coming from kbs-CentOS-Testing and it loads fine on other boxes. However, on this one I get:

mysql-5.0.77-4.el5_6.6.x86_64 from updates has depsolving problems --> mysql conflicts with MySQL-server Error: mysql conflicts with MySQL-server

Super.

So looks like I need to remove the current mysql and install a new one from yum

SO.. the big questions, if I yum remove mysql* does that also effect the /var/lib data or any of my permissions.. is there a way to save all that data and just re-apply to the new mysql installation?

Thanks,


Solution 1:

I doubt the MySQL-server package you have installed from some third party (maybe mysql.com) would remove the databases on package removal but you can always see what scripts are run pre/post install in an RPM

rpm --query --scripts MySQL-server

should show all the scripts associated with the package and you can read through them to see what is automated. you can also check to see if there are any triggers which would run scripts via RPM as well. rpm --help is your friend, look at all the reporting options available with --query