MySQL 5.5 and 5.1 on CentOS
First, to set up the yum repository, install the webtatic-release RPM:
MySQL client library is used with several CentOS packages, so to remove MySQL without them, I have a mysql client library which is independent of the client tools, which can be installed first to be used instead.
Then you can uninstall MySQL:
Then install the new MySQL version (either mysql51 or mysql55 can be installed here):
You should upgrade existing tables before setting the server to become a production machine, which can be done by starting the server and running the mysql_upgrade script (this may take time depending on the size of the database).