[csw-users] stop mysql process

Manish Agrawal magrawal at coba.usf.edu
Sat Jun 2 02:58:40 CEST 2007


I have a stray mysql process I cannot get rid of, even after reboot. I had a Blastwave SAMP stack on this machine before, but to be sure that the packages did not conflict with zone packages, I did (following http://blogs.sun.com/glagasse/entry/how_to_remove_a_batch):

yes | pkgrm `pkginfo | grep CSW | awk '{print $2}'`

But now this mysql process keeps starting all by itself even though the mysql package is not there. How can I get rid of the mysql process and reclaim the memory used by the process? I may have run mysqld_safe as part of the install process (following Neil Pollack's blog) and forgotten to kill it before removing the package, but I can't remember now.

Thanks very much
Manish

---===mysql5 is running from /opt/csw/mysql5/===---
-bash-3.00# ps -ef | grep mysql
    dcom1  7467  6210   0 17:40:01 ?           0:05 /opt/csw/mysql5/libexec/mysql                                    d --basedir=/opt/csw/mysql5 --datadir=/opt/csw/mys
     root  6210     1   0 17:38:53 ?           0:00 /bin/sh /opt/csw/mysql5/bin/m                                    ysqld_safe --pid-file=/opt/csw/mysql5/var/mysql.pi
     root 10427 10353   0 20:45:30 pts/2       0:00 grep mysql

---===but there is no mysql5 directory===---
-bash-3.00# ls -al /opt/csw
total 26
drwxr-xr-x   7 root     bin          512 May 30 07:08 .
drwxr-xr-x   5 root     sys          512 May 18 10:33 ..
drwxr-xr-x   2 root     bin         2560 May 30 07:06 bin
drwxr-xr-x   3 root     bin          512 May 30 07:06 etc
drwxr-xr-x   4 root     bin         4608 May 30 07:06 lib
drwxr-xr-x   4 root     bin          512 May 30 07:06 share
drwxr-xr-x   3 root     bin          512 May 23 14:46 var

---===killing does not seem to help===---
-bash-3.00# pkill mysql
-bash-3.00# ps -ef | grep mysql
     root 10439     1   0 20:49:13 ?           0:00 /bin/sh /opt/csw/mysql5/bin/mysqld_safe --pid-file=/opt/csw/mysql5/var/mysql.pi
    dcom1 10509 10439   1 20:49:13 ?           0:00 /opt/csw/mysql5/libexec/mysqld --basedir=/opt/csw/mysql5 --datadir=/opt/csw/mys
     root 10511 10353   0 20:49:15 pts/2       0:00 grep mysql

-bash-3.00# kill 10439
-bash-3.00# kill 10509
-bash-3.00# ps -ef | grep mysql
     root 10527   943   0 20:50:10 ?           0:00 /bin/sh /opt/csw/lib/svc/method/svc-mysql5 start
     root 10529     1   0 20:50:10 ?           0:00 /bin/sh /opt/csw/lib/svc/method/svc-mysql5 start
     root 10525 10353   0 20:50:10 pts/2       0:00 grep mysql

---===where is this svc-mysql5 coming from?===---
-bash-3.00# ls -al /opt/csw/lib/svc/method/
total 4
drwxr-xr-x   2 root     other        512 May 30 07:02 .
drwxr-xr-x   3 root     other        512 May 23 14:46 ..


---===and how is it starting up again, all by itself?===---
-bash-3.00# ps -ef | grep mysql
     root 10529     1   0 20:50:10 ?           0:00 /bin/sh /opt/csw/mysql5/bin/mysqld_safe --pid-file=/opt/csw/mysql5/var/mysql.pi
     root 10602 10353   0 20:50:59 pts/2       0:00 grep mysql
    dcom1 10599 10529   0 20:50:11 ?           0:00 /opt/csw/mysql5/libexec/mysqld --basedir=/opt/csw/mysql5 --datadir=/opt/csw/mys

---===There is no svcs entry===---
-bash-3.00# svcs -a | grep mysql
-bash-3.00# svcs -p | grep mysql
-bash-3.00#



More information about the users mailing list