MySQL: How to clean MySQL from RHEL5?
Search for mysql-related packages that are now installed: rpm -qa | grep -i mysql

Delete any packages like mysql, mysql-server, mysql-client, mysql-shared, mysql-shared-compat, mysql-libs. yum remove mysql-server You do not need to remove mysql library bindings like python-mysqldb, php-mysql, etc., unless they had a dependency with some of the previous packages.

I recommend you to install the Oracle MySQL yum repositories, that will make the installing and maintenance much easier, unless you know what you are doing and want more control over your packages. An installation guide is detailed here: http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/index.html Basically, it involves creating a .repo file and yum update.