I waas using the rpm -e packagename
Please do not obfuscate your reporting. I'm guessing you mean that you did:
rpm -e mysql
If so, I would expect you would see something like:
[root@test7 ~]# rpm -e mysql
error: Failed dependencies:
libmysqlclient.so.14 is needed by (installed) perl-DBD-MySQL-2.9004-3.1.i386
libmysqlclient.so.14 is needed by (installed) dovecot-0.99.14-1.2.el4.rf.i386
libmysqlclient.so.14 is needed by (installed) mysql-server-4.1.12-3.RHEL4.1.i386
libmysqlclient.so.14 is needed by (installed) php-mysql-4.3.9-3.12.i386
libmysqlclient_r.so.14 is needed by (installed) mysql-server-4.1.12-3.RHEL4.1.i386
mysql = 4.1.12-3.RHEL4.1 is needed by (installed) mysql-server-4.1.12-3.RHEL4.1.i386
mysql >= 3.23 is needed by (installed) turba-h3-2.0.4-02sme01.noarch
mysql is needed by (installed) rt-3.4.5-1.noarch
mysql is needed by (installed) e-smith-horde-1.12.0-02.noarch
mysql is needed by (installed) e-smith-mysql-1.12.0-05.noarch
[root@test7 ~]#
The package would not have been removed and there would be no damage to repair.
So I repeat my question - how did you (really) remove mysql?
For erasing - I guess a new complete install would be the solution.
That would be one solution, but certainly not the only one.