Anybody can teach me about ....

trytry

Verified User
Joined
Jan 17, 2006
Messages
15
i want to write a script that ...
if the mysqld is down ...then reboot the server ....

i need to reboot becuase my mysqld is always down....and can't stop the serivce ....
and i cannot kill the pid ......

does anybody wirte it before?


thank very much ..
>.<
 
trytry, did you really mean reboot the server? Not a good idea.

Is mysql down or just not responding? If it's really down, then a simple restart of the service would work.]

If it's simply unresponsive, then...

Rebooting the server will take a while, during which time the shutdown script will try to shut down mysql cleanly.

If it can't, it'll force a shutdown, which could easily cause database inconsistencies.

You'd be better off just trying to stop and/or restart the service.

Jeff
 
thanks sky, jlasman and the author of sim scripts,

but in my case , i can't stop the mysqld by command

i searched some old post that we can kill some process by kill command manually, but i failed to do so .. also it is diffcult that killing each pid in a short time since it is quite a lot ....

so i have no method that i should reboot the whole server....
but is that the SIM can shutdown the mysqld cleanly?
what command does it use?

i am still seeking a prefect solution , thanks for help

TryTry:)




jlasman said:
trytry, did you really mean reboot the server? Not a good idea.

Is mysql down or just not responding? If it's really down, then a simple restart of the service would work.]

If it's simply unresponsive, then...

Rebooting the server will take a while, during which time the shutdown script will try to shut down mysql cleanly.

If it can't, it'll force a shutdown, which could easily cause database inconsistencies.

You'd be better off just trying to stop and/or restart the service.

Jeff
 
ok , i will try the SIM first ..

but is the script have an option that restart the service first, if fails, then reboot the server ?

thanks.
:rolleyes:

Trytry
 
No, because most linux admins don't believe in restarting the server. I've got servers with uptime in the neighborhood of a year, and in the past I've gone (I think it was) about two and a half years.

(Things were simpler in the old days :) .)

Jeff
 
oh i see...
yes , i also believe reboot is a w**dows 's word ...

however , i really have no method about this problem >.<
i have another five server with same config don't have this problem:eek:


jlasman said:
No, because most linux admins don't believe in restarting the server. I've got servers with uptime in the neighborhood of a year, and in the past I've gone (I think it was) about two and a half years.

(Things were simpler in the old days :) .)

Jeff
 
mysqld hang again
Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)
Errno.: 2002

i searched many old post and dig in google , all can't solve my problem..

:(
 
Last edited:
The perfect solution is finding out why it's crashing and fix the problem instead of setting up a script to reboot it constantly.

What do the error logs say right before MySQl goes down? Do you have multiple MySQL installations that could be fighting eachother for that port?

Have you tried fine tuning if it's load related?

OT:
Has anybody seen that gag commercial about What if Ford made cars like Bill Gates made computers
or Why cars haven't developed as fast as computers (something like that)
There was also an email floating around with it.

That was pretty funny.
 
no , i just use DA installation with clean linux fedora core 4

any i have tuned some setting of my.cnf ...

yesterday, installed SIM script ...but it didn't detect it was down
when it was down today .....

i really don't know what can i do ....:(


jmstacey said:
The perfect solution is finding out why it's crashing and fix the problem instead of setting up a script to reboot it constantly.

What do the error logs say right before MySQl goes down? Do you have multiple MySQL installations that could be fighting eachother for that port?

Have you tried fine tuning if it's load related?

OT:
Has anybody seen that gag commercial about What if Ford made cars like Bill Gates made computers
or Why cars haven't developed as fast as computers (something like that)
There was also an email floating around with it.

That was pretty funny.
 
MySQL will appear to hang if it's got more requests than it can handle.

There's a mysql optimization configuration here.

Jeff
 
jlasman said:
MySQL will appear to hang if it's got more requests than it can handle.

There's a mysql optimization configuration here.

Jeff

i tried before but useless...:(
 
It certainly wasn't useless for us; it was very helpful.

Don't forget that the numbers in the example I posted are just that; example numbers. If your MySQL is getting a lot of hits, perhaps you need to modify the numbers.

Jeff
 
thanks very much .
i also increased the value before...

in fact mysql 's loading is not very high...
and i find that the mysql is not down at the rush hour....

i am thinking of changing OS and MYSQL ..
Do you know is that any problems of my client database (mainly some forum program such as phpbb, vbulletin) if i downgrade the mysql to 4.0 instead of 4.1 ?

jlasman said:
It certainly wasn't useless for us; it was very helpful.

Don't forget that the numbers in the example I posted are just that; example numbers. If your MySQL is getting a lot of hits, perhaps you need to modify the numbers.

Jeff
 
Back
Top