dbTalk Databases Forums  

in a loop, can't kill a mysql process, start it or stop it

comp.databases.mysql comp.databases.mysql


Discuss in a loop, can't kill a mysql process, start it or stop it in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JRough
 
Posts: n/a

Default in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 08:06 PM






These are the commands I used. I changed the mysql.socket location
and restarted the web server. NOw it can't find the old mysqld_safe
process to stop it. I can't kill it with "kill -9 PID" either. It
seems like it does kill that PID but then it assigns the old process
another PID.

sh-3.2# mysqld_safe --user=_mysql
100308 17:00:21 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
100308 17:00:21 mysqld_safe A mysqld process already exists
sh-3.2# mysqld_safe shutdown
100308 17:01:35 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
100308 17:01:35 mysqld_safe A mysqld process already exists
sh-3.2# mysqladmin -u root -p shutdown
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock'
exists!
sh-3.2# sudo mysqld_safe
100308 17:03:10 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
100308 17:03:10 mysqld_safe A mysqld process already exists
thanks,

Reply With Quote
  #2  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 08:27 PM






JRough wrote:
Quote:
These are the commands I used. I changed the mysql.socket location
and restarted the web server. NOw it can't find the old mysqld_safe
process to stop it. I can't kill it with "kill -9 PID" either. It
seems like it does kill that PID but then it assigns the old process
another PID.

Why did you try and change it while MySQL was running? No wonder it
didn't work!

Change it back, stop MySQL, and make your changes. Then start MySQL
with the new parameters.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #3  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 08:55 PM



On Mon, 8 Mar 2010 17:06:53 -0800 (PST), JRough wrote:
Quote:
These are the commands I used. I changed the mysql.socket location
and restarted the web server. NOw it can't find the old mysqld_safe
process to stop it. I can't kill it with "kill -9 PID" either. It
seems like it does kill that PID but then it assigns the old process
another PID.

sh-3.2# mysqld_safe --user=_mysql
100308 17:00:21 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
100308 17:00:21 mysqld_safe A mysqld process already exists
sh-3.2# mysqld_safe shutdown
100308 17:01:35 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
100308 17:01:35 mysqld_safe A mysqld process already exists
sh-3.2# mysqladmin -u root -p shutdown
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock'
exists!
sh-3.2# sudo mysqld_safe
100308 17:03:10 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
100308 17:03:10 mysqld_safe A mysqld process already exists
thanks,
Put the socket settings back, shut down the mysql server, change the
socket setting again, start server. If that doesn't work, it's probably
because the server ISN'T running and the .pid file is just lying around
and you need to delete it by hand.

Don't change settings while a server is running if you don't KNOW that
you know what you're doing.

--
Yes, Java is so bulletproofed that to a C programmer it feels like
being in a straightjacket, but it's a really comfy and warm
straightjacket, and the world would be a safer place if everyone was
straightjacketed most of the time. -- Mark 'Kamikaze' Hughes

Reply With Quote
  #4  
Old   
JRough
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 08:57 PM



On Mar 8, 5:27*pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
JRough wrote:
These are the commands I used. *I changed the mysql.socket location
and restarted the web server. *NOw it can't find the old mysqld_safe
process to stop it. *I can't kill it with "kill -9 PID" either. *It
seems like it does kill that PID but then it assigns the old process
another PID.

Why did you try and change it while MySQL was running? *No wonder it
didn't work!

Change it back, stop MySQL, and make your changes. *Then start MySQL
with the new parameters.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================
I tried that, anyother suggestion?

Reply With Quote
  #5  
Old   
The Natural Philosopher
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 09:18 PM



JRough wrote:
Quote:
On Mar 8, 5:27 pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
JRough wrote:
These are the commands I used. I changed the mysql.socket location
and restarted the web server. NOw it can't find the old mysqld_safe
process to stop it. I can't kill it with "kill -9 PID" either. It
seems like it does kill that PID but then it assigns the old process
another PID.
Why did you try and change it while MySQL was running? No wonder it
didn't work!

Change it back, stop MySQL, and make your changes. Then start MySQL
with the new parameters.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================

I tried that, anyother suggestion?
Ignore Jerry?

It wont fix your SQL, but it makes for less fruitless activity ;-)

if all else fails disable the init script, and reboot the machine.

Reply With Quote
  #6  
Old   
JRough
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 09:23 PM



On Mar 8, 5:27*pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
JRough wrote:
These are the commands I used. *I changed the mysql.socket location
and restarted the web server. *NOw it can't find the old mysqld_safe
process to stop it. *I can't kill it with "kill -9 PID" either. *It
seems like it does kill that PID but then it assigns the old process
another PID.

Why did you try and change it while MySQL was running? *No wonder it
didn't work!

Change it back, stop MySQL, and make your changes. *Then start MySQL
with the new parameters.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================
This is the process that won't shut down:
_mysql 5190 0.0 0.8 2739116 18408 ?? S 6:11PM
0:00.49 /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/bin/mysqld --
basedir=/usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/ --

I tried a forced shutdown with the _mysql user:
janis-roughs-power-mac-g5:~ jlrough$ mysqld shutdown --silent --force
--user=_mysql
100308 18:16:32 [Warning] Can't create test file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.lower-test
100308 18:16:32 [Warning] Can't create test file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.lower-test
mysqld: Can't change dir to '/usr/local/mysql-5.1.40-osx10.5-
powerpc-64bit/data/' (Errcode: 13)
100308 18:16:32 [ERROR] Aborting

100308 18:16:32 [Note] mysqld: Shutdown complete

I got errors about not being able to lock the ibdata table
noDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
100308 18:23:07 InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process


janis-roughs-power-mac-g5:~ jlrough$

Reply With Quote
  #7  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 09:24 PM



JRough wrote:
Quote:
On Mar 8, 5:27 pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
JRough wrote:
These are the commands I used. I changed the mysql.socket location
and restarted the web server. NOw it can't find the old mysqld_safe
process to stop it. I can't kill it with "kill -9 PID" either. It
seems like it does kill that PID but then it assigns the old process
another PID.
Why did you try and change it while MySQL was running? No wonder it
didn't work!

Change it back, stop MySQL, and make your changes. Then start MySQL
with the new parameters.


I tried that, anyother suggestion?
What happened when you tried it? Are you sure you made the correct changes?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #8  
Old   
Greg Russell
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 09:53 PM



In news:hn4b5i$u03$1 (AT) news (DOT) albasani.net,
The Natural Philosopher <tnp (AT) invalid (DOT) invalid> typed:

Quote:
Ignore Jerry?
Interesting that you would ridicule him in c.l.p. for the exact same weekly
status you hold in this newsgroup, except that you had even less original
content:

"Caveat: Quantity is not necessarily a measure of Quality"
Newsgroup.................: comp.databases.mysql
....
Top 10 Prolific Posters: Posts / Posts per Day / Percent Share
======================================
1. The Natural Philosopher...........................: 9 1.3 8.8%
....
Top 10 Bandwidth-Using Posters: kBytes / kBytes per Day / Percent Share
======================================
1. The Natural Philosopher...........................: 37 5.4 13.8%
....
Top 10 Original Content Ratings: (Original Bytes) / (Orig. + Quoted Bytes)
================================================== ========================
....
4. Jerry Stuckle........................................... ..: 19.1%
5. The Natural Philosopher...................................: 18.2%

Reply With Quote
  #9  
Old   
JRough
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-08-2010 , 10:33 PM



On Mar 8, 6:53*pm, "Greg Russell" <gruss... (AT) invalid (DOT) com> wrote:
Quote:
Innews:hn4b5i$u03$1 (AT) news (DOT) albasani.net,
The Natural Philosopher <t... (AT) invalid (DOT) invalid> typed:

Ignore Jerry?

Interesting that you would ridicule him in c.l.p. for the exact same weekly
status you hold in this newsgroup, except that you had even less original
content:

"Caveat: Quantity is not necessarily a measure of Quality"
*Newsgroup.................: comp.databases.mysql
...
*Top 10 Prolific Posters: Posts / Posts per Day / Percent Share
*======================================
* *1. The Natural Philosopher...........................: * 9 *1.3 *8.8%
...
*Top 10 Bandwidth-Using Posters: kBytes / kBytes per Day / Percent Share
*======================================
* *1. The Natural Philosopher...........................: *37 *5.4 13.8%
...
*Top 10 Original Content Ratings: (Original Bytes) / (Orig. + Quoted Bytes)
*================================================= =========================
...
* *4. Jerry Stuckle........................................... ..: *19.1%
* *5. The Natural Philosopher...................................: *18.2%
I should have thought of restarting my computer. It got rid of the
pid and now the mysql.sock error is gone too. Thank you all.

Reply With Quote
  #10  
Old   
The Natural Philosopher
 
Posts: n/a

Default Re: in a loop, can't kill a mysql process, start it or stop it - 03-09-2010 , 02:37 PM



JRough wrote:
Quote:
On Mar 8, 6:53 pm, "Greg Russell" <gruss... (AT) invalid (DOT) com> wrote:
Innews:hn4b5i$u03$1 (AT) news (DOT) albasani.net,
The Natural Philosopher <t... (AT) invalid (DOT) invalid> typed:

Ignore Jerry?
Interesting that you would ridicule him in c.l.p. for the exact same weekly
status you hold in this newsgroup, except that you had even less original
content:

"Caveat: Quantity is not necessarily a measure of Quality"
Newsgroup.................: comp.databases.mysql
...
Top 10 Prolific Posters: Posts / Posts per Day / Percent Share
======================================
1. The Natural Philosopher...........................: 9 1.3 8.8%
...
Top 10 Bandwidth-Using Posters: kBytes / kBytes per Day / Percent Share
======================================
1. The Natural Philosopher...........................: 37 5.4 13.8%
...
Top 10 Original Content Ratings: (Original Bytes) / (Orig. + Quoted Bytes)
================================================== ========================
...
4. Jerry Stuckle........................................... ..: 19.1%
5. The Natural Philosopher...................................: 18.2%

I should have thought of restarting my computer. It got rid of the
pid and now the mysql.sock error is gone too. Thank you all.
yes. Thanks for thanking me, for providing the answer.

Otherwise, no comment.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.