2

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,

1
  • Here was the fix... yum remove MySQL* yum install mysql* Simple fix, but scary to remove mysql, as you can never be sure your data is safe! Did a full backup and tested.. and it worked!
    – Joe
    Aug 31, 2011 at 6:50

1 Answer 1

2

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

1
  • Hmm, just ran that, looks like it does not remove data... perhaps... Here is what it says: code preuninstall scriptlet (using /bin/sh): if test $1 = 0 then # Stop MySQL before uninstalling it if test -x /etc/init.d/mysql then /etc/init.d/mysql stop > /dev/null # Remove autostart of mysql # for older SuSE Linux versions if test -x /sbin/insserv then /sbin/insserv -r /etc/init.d/mysql # use chkconfig on Red Hat and newer SuSE releases elif test -x /sbin/chkconfig then /sbin/chkconfig --del mysql fi fi fi
    – Joe
    Aug 30, 2011 at 20:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .