Had a need to quickly (and easily) replace some yum packages this evening, namely getting mysql5.0 to 5.5 and php5.1 up to 5.3. I wasn’t looking forward to doing this manually as keeping the dependencies in check is a faff at best. A quick Google however led me to the package yum-plugin-replace. This very easily sorts all the plugins out, flips them in out, shakes them all about and quicker than you can say Robert’s your mother’s brother sorts it all out. Getting it going is easy:

yum install yum-plugin-replace
yum replace mysql --replace-with mysql55

Do the usual confirmations and you’re done! Same goes with php to php53. This does of course assume you’ve already installed the EPEL and IUS channels to get this packages from. On a side note, if you do mysql don’t forget to run the upgrade script.

mysql_upgrade --password