Can't uninstall MYSQL from RED HAT ES

Hi Everyone

Could you kindly advise on how I should do a chkconfig and uninstalling mysql rpm on Red hat ES.Please check the errors that I'm getting below. :eek:

I need to uninstall MySQL completely from my linux system ver 2.4.21-37 and use the chkconfig command to switch it on permanently after reinstalling it but I'm getting the below error on both my servers.My SQL is installed and the mysqld is running.

klmback:mms$ rpm -e mysql*
error: package mysql-3.23.58-16.RHEL3.1.i386.rpm is not installed
error: package mysql-3.23.58-1.i386.rpm is not installed
error: package mysql-bench-3.23.58-16.RHEL3.1.i386.rpm is not installed
error: package mysql-client-3.23.58-1.i386.rpm is not installed
error: package mysql-devel-3.23.58-16.RHEL3.1.i386.rpm is not installed
error: package mysql-server-3.23.58-1.72.i386.rpm is not installed
klmback:mms$ rpm -e MySQL*
error: package MySQL is not installed
error: package MySQL-client-4.0.21-0.i386.rpm is not installed
error: package MySQL-client-standard-4.1.16-1.rhel3.i386.rpm is not installed
error: package MySQL-devel-standard-4.1.16-1.rhel3.i386.rpm is not installed
error: package MySQL-python-0.9.1-6.i386.rpm is not installed
error: package MySQL-server-4.0.21-0.i386.rpm is not installed
error: package MySQL-server-standard-4.1.16-1.rhel3.i386.rpm is not installed
error: package MySQL-shared-standard-4.1.16-1.rhel3.i386.rpm is not installed
klmback:mms$ rpm -qa | grep i mysql
grep: mysql: No such file or directory
klmback:mms$ rpm -qa | grep -i mysql
MySQL-client-standard-4.1.21-0.rhel3
MySQL-server-standard-4.1.21-0.rhel3
klmback:mms$

root 32090 0.0 0.0 4212 1120 ? S 16:26 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/klmback.pid
mysql 32114 0.0 0.7 48428 14716 ? S 16:26 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/k
root 459 0.0 0.0 6844 2024 ? S 16:42 0:00 sshd: mms [priv]

klmback: mms logged out at Wed Jan 3 17:04:15 SAST 2007
Connection to klmback closed.
klmdisp:mms$ chkconfig
-bash: chkconfig: command not found
klmdisp:mms$ chkconfig mysqld on
-bash: chkconfig: command not found
klmdisp:mms$

I tried to install the rpm packed for chkconfig but does not want to install.

Thanks

I assume you're attempting all this as root? Your prompt suggests otherwise (although of course, it's up to you how you define PS1).

Anyway, chkconfig lives in /sbin which, if you're attempting all this as a standard user, will not likely be in your PATH.

In any case,

/etc/init.d/mysqld stop

will stop it.

Then, do (as root again)

rpm -e `rpm -qa | grep -i mysql`

Cheers
ZB

after removing the mysql rpm , try to remove the database where u have created using the mysql commands and remove the service port from /etc/services and application directory /opt/mysql to completley uninstall the software

Hi Guys,

I managed to switch on the mysqld using chkconfig from my other server.
I also manged to remove mysql completely but it's still giving me a headich cause not it does not wan't to install.I have pasted a long screen shot of how I'm intalling it including the package that I install for mysql these same packages are installed on the other server and are working 100% please have a look below I know it's a long post probable you will pickup what I'm doing wrong.

Please assist :confused:

klmdisp:mms$ ssh klmback
klmback:mms$ su
Password:
klmback:mms# ls
analysis common.tgz Install MySQL-client-4.0.21-0.i386.rpm script.txt
avail.frm cppoptions j2re-1_4_2_09-linux-i586.bin mysql-server-3.23.58-1.72.i386.rpm speed.txt
backup_ddbs CVS jdk1.3.1_09 MySQL-server-4.0.21-0.i386.rpm themaster.frm
--C DBParameters.props jdk1.3.1_09.tgz nohup.out usersetup
chkfontpath-1.9.10-1.RHEL.i386.rpm delete load_codes.dont_use out.dat?
client_dbini.bak dspbackup.log menus.ba out.txt?
client.script dsp_print.dat mmsv22.tgz pitdat.04
codes hubsetup mysql-client-3.23.58-1.i386.rpm reasnmod.bak
klmback:mms# rpm -ivh --nodeps mysql-server-3.23.58-1.72.i386.rpm
warning: mysql-server-3.23.58-1.72.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:mysql-server ########################################### [100%]
klmback:mms# rpm -ivh --nodeps mysql-client-3.23.58-1.i386.rpm
warning: mysql-client-3.23.58-1.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
Preparing... ########################################### [100%]
file /usr/bin/mysqladmin from install of mysql-client-3.23.58-1 conflicts with file from package mysql-server-3.23.58-1.72
klmback:mms#
klmback:mms#
klmback:mms# /etc/init.d/mysqld start
Starting MySQL: [ OK ]
klmback:mms# ps -ef | grep mysqld
root 17752 17637 0 16:01 pts/1 00:00:00 grep mysqld
klmback:mms#

klmback:log# cd /var/lib/mysql/
klmback:mysql# ls
ibdata1 ib_logfile0 ib_logfile1 klmback.err klmbackup.localdomain.err mysql prism test
klmback:mysql# cd /var/lib/
klmback:lib# /etc/init.d/mysqld stop
Stopping MySQL: [FAILED]
klmback:lib# rpm -e `rpm -qa | grep -i mysql`
klmback:lib# rpm -qa | grep -i mysqlrpm -qa | grep -i mysqlrpm -qa | grep -i mysql
klmback:lib# rpm -qa | grep -i mysql
klmback:lib# rm -R mysql/
rm: descend into directory `mysql/'? y
rm: descend into directory `mysql//mysql'? y
rm: remove regular file `mysql//mysql/db.frm'? y
rm: remove regular file `mysql//mysql/db.MYI'? y
rm: remove regular file `mysql//mysql/db.MYD'? y
rm: remove regular file `mysql//mysql/host.frm'? y
rm: remove regular file `mysql//mysql/host.MYI'? y
rm: remove regular empty file `mysql//mysql/host.MYD'? y
rm: remove regular file `mysql//mysql/user.frm'? y
rm: remove regular file `mysql//mysql/user.MYI'? y
rm: remove regular file `mysql//mysql/user.MYD'? y
rm: remove regular file `mysql//mysql/func.frm'? y
rm: remove regular file `mysql//mysql/func.MYI'? y
rm: remove regular empty file `mysql//mysql/func.MYD'? y
rm: remove regular file `mysql//mysql/tables_priv.frm'? y
rm: remove regular file `mysql//mysql/tables_priv.MYI'? y
rm: remove regular empty file `mysql//mysql/tables_priv.MYD'? y
rm: remove regular file `mysql//mysql/columns_priv.frm'? y
yrm: remove regular file `mysql//mysql/columns_priv.MYI'?
yrm: remove regular empty file `mysql//mysql/columns_priv.MYD'?
yrm: remove regular file `mysql//mysql/help_topic.frm'?
y
rm: remove regular file `mysql//mysql/help_topic.MYI'? rm: remove regular file `mysql//mysql/help_topic.MYD'? y
yrm: remove regular file `mysql//mysql/help_category.frm'?
yrm: remove regular file `mysql//mysql/help_category.MYI'?
y
rm: remove regular file `mysql//mysql/help_category.MYD'? rm: remove regular file `mysql//mysql/help_relation.frm'? y
rm: remove regular file `mysql//mysql/help_relation.MYI'? y
yrm: remove regular file `mysql//mysql/help_relation.MYD'?
y
rm: remove regular file `mysql//mysql/help_keyword.frm'? rm: remove regular file `mysql//mysql/help_keyword.MYI'? y
yrm: remove regular file `mysql//mysql/help_keyword.MYD'?
y
rm: remove regular file `mysql//mysql/time_zone_name.frm'? rm: remove regular file `mysql//mysql/time_zone_name.MYI'? y
yrm: remove regular empty file `mysql//mysql/time_zone_name.MYD'?
y
rm: remove regular file `mysql//mysql/time_zone.frm'? rm: remove regular file `mysql//mysql/time_zone.MYI'? y
y
rm: remove regular empty file `mysql//mysql/time_zone.MYD'? rm: remove regular file `mysql//mysql/time_zone_transition.frm'? y
yrm: remove regular file `mysql//mysql/time_zone_transition.MYI'?
y
rm: remove regular empty file `mysql//mysql/time_zone_transition.MYD'? rm: remove regular file `mysql//mysql/time_zone_transition_type.frm'? y
yrm: remove regular file `mysql//mysql/time_zone_transition_type.MYI'?
y
rm: remove regular empty file `mysql//mysql/time_zone_transition_type.MYD'? rm: remove regular file `mysql//mysql/time_zone_leap_second.frm'? y
y
rm: remove regular file `mysql//mysql/time_zone_leap_second.MYI'? rm: remove regular empty file `mysql//mysql/time_zone_leap_second.MYD'? y
yrm: remove directory `mysql//mysql'?
y
rm: remove directory `mysql//test'? rm: remove regular file `mysql//klmbackup.localdomain.err'? y
yrm: remove regular file `mysql//klmback.err'?
y
rm: remove regular file `mysql//ibdata1'? y
y
rm: remove regular file `mysql//ib_logfile0'? rm: remove regular file `mysql//ib_logfile1'? rm: descend into directory `mysql//prism'? y
yrm: remove regular file `mysql//prism/db.opt'?
y
rm: remove regular file `mysql//prism/RPCSPL.frm'? rm: remove regular file `mysql//prism/RPCSPL.MYI'? y
yrm: remove regular empty file `mysql//prism/RPCSPL.MYD'?
y
yrm: remove regular file `mysql//prism/ALARMLOG.frm'? rm: remove regular file `mysql//prism/ALARMLOG.MYI'?
y
rm: remove regular empty file `mysql//prism/ALARMLOG.MYD'? rm: remove regular file `mysql//prism/ALARMS.frm'? y
yrm: remove regular file `mysql//prism/ALARMS.MYI'?
y
rm: remove regular file `mysql//prism/ALARMS.MYD'? rm: remove regular file `mysql//prism/NETSTATS.frm'? y
yrm: remove regular file `mysql//prism/NETSTATS.MYI'?
y
rm: remove regular empty file `mysql//prism/NETSTATS.MYD'? rm: remove regular file `mysql//prism/COMMSTATS.MYI'? y
yrm: remove regular file `mysql//prism/NODES.frm'?
y
rm: remove regular file `mysql//prism/NODES.MYI'? rm: remove regular empty file `mysql//prism/NODES.MYD'? y
yrm: remove regular empty file `mysql//prism/COMMSTATS.MYD'?
y
yrm: remove regular file `mysql//prism/COMMSTATS.frm'? rm: remove regular file `mysql//prism/NODE_HISTORY.frm'? y
yrm: remove regular file `mysql//prism/NODE_HISTORY.MYI'?
y
yrm: remove regular empty file `mysql//prism/NODE_HISTORY.MYD'? rm: remove directory `mysql//prism'? y

alternatives dhcp logrotate.status misc ntp random-seed scrollkeeper squirrelmail up2date xkb
dav games menu nfs pcmcia rpm slocate supportinfo xdm

klmback:mms# rpm -ivh --nodeps mysql-client-3.23.58-1.i386.rpm
warning: mysql-client-3.23.58-1.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
Preparing... ########################################### [100%]
1:mysql-client ########################################### [100%]
klmback:mms# rpm -ivh --nodeps mysql-server-3.23.58-1.72.i386.rpm
warning: mysql-server-3.23.58-1.72.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
file /usr/bin/mysqladmin from install of mysql-server-3.23.58-1.72 conflicts with file from package mysql-client-3.23.58-1
klmback:mms#

Thanks a lot
Collen

Oh, still you are using mysql 3 its too old. Just do one thing remove mysql completely.

#rpm -qa | grep mysql
then you will get the list of installed mysql packages
then
remove one by one rpm
#rpm -e rpmname
then

go to the link Index of /mysqlinstall

download the latest mysql version for your distribution and then install.

that's it,

Prashant
System Administrator.

Hi there,

Thanks Prashant for the reply, what you suggesting is already been done.The reason I'm using mysql 3 it's because of the application software that I'm using.

Anyone with any knowledge of why I'm getting conflicts when installing mysql client.

klmback:mms# rpm -ivh --nodeps mysql-client-3.23.58-1.i386.rpm
warning: mysql-client-3.23.58-1.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
Preparing... ########################################### [100%]
file /usr/bin/mysqladmin from install of mysql-client-3.23.58-1 conflicts with file from package mysql-server-3.23.58-1.72

All help is highly appreciated.
Collen

Actually this is due to mysql-server. You have installed mysql-server-3.23.58-1.72 on the server but the mysql client version is mysql-client-3.23.58-1.i386.rpm. This is a version mismatch issue

I will update you after 10 hours.

Prashant,

Do you have the rehhat cd's. Please let me know.

Prashant,

Hi Prashant

Thanks for the help.
Yes I do have the Red hat cd's.

Thanks
Collen

Hi Prashant,

I'm still waiting for the solution to this problem.

Thanks
Gugu :rolleyes:

Please install the mysql rpms from that cd's.

Prashant,

Howzit Prashant, :confused:

The Red Hat software that I'm using for the servers is Red hat ES 3 with patch 8 this only comes with mysql server not the client.When you install my sql from the cd it does not work.Any ideas guys as I had told you the rpm packages Server/Client are working 100% on the other server but I'm getting conflicts on this server when intalling them.

Cheers
Gugu

Find the same mysql client version from http://rpmfind.net

Let me know.

Prashant

Please have a look at the rules whilst you're waiting.

You'll see that bumping up threads is not permitted.

Cheers
ZB

Hello CollenM,

have u installed mysql?

Prashant

First of all, your trying to uinstall file.rpm instead of package

I don't have any linux rpm distribution under hand , but i think the better idea is

1 - List the package of mysql install

rpm -qa | grep -i mysql

2 - uinstall each package on by one

rpm -e PACKAGE