RE: mysql startup script problem

2003-07-10 Thread Rudy Metzger
Actually, mysql is only the client used to connect to mysqld.
mysqld does NOT automatically start up when it crashes.
But you can use mysqld_safe (or safe_mysqld which is a softlink to
former). This script then takes care of logging and restarting the
server. Init.d uses mysqld_safe.

Cheers
/rudy

-Original Message-
From: Cory Lamle [mailto:[EMAIL PROTECTED] 
Sent: woensdag 9 juli 2003 23:50
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: mysql startup script problem

Contents are Direct Alliance Corporation CONFIDENTIAL
-

Duane,
Does mysql actually start back up? Or just get hung on step(4)?

I know I have had problems running scripts over ssh because the
sudo
environment user wasn't being executed as root.  (where a cron_tab was
actually executing the script).  Maybe make sure the env is trying to
start
the script as the correct user.



-Original Message-
From: Duane Winner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 11:27 AM
To: [EMAIL PROTECTED]
Subject: mysql startup script problem

Hello all -

I'm having a small problem with the mysql startup script that ships with
MySQL-3.23.56-1.
I'm running on RedHat Linux.

It works fine, but I have a backup server that runs a script that passes
these commands remotely through ssh:

(1) ssh dbsys-dc "sudo /etc/init.d/mysql stop" 

(2) ssh dbsys-dc "sudo tar
czpf - /var" > dbsys-dc.var.$(date -I).tgz 

(3) ssh dbsys-dc "sudo tar czpf
- /db" > dbsys-dc.db.$(date -I).tgz 

(4) ssh dbsys-dc "sudo
/etc/init.d/mysql start"

Essentially, what I'm doing is stopping the mysql server, then backing
up
the directories, the starting the server again.

The problem is that I have additional commands in my backup script
following line 4 above (backup additional filesystems and server, then
write all the tarballs to tape), but the mysql start script does not
exit
properly after starting the mysql server, and I come in the next morning
and find that my backup script is stuck on line 4 above, so the rest of
my
filesystems and servers never get backed up, nor get written to tape.

If I do a "ps aux" and find the PID for that task and kill it, then the
rest of my script will proceed.

"mysql stop" seems to exit fine -- it's just "mysql start" that seems to
keep the shell locked.

Does anybody know how to fix this or a workaround?

Thanks so much.

Duane Winner
[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
This message is for the designated recipient(s) only and contains Direct
Alliance Corporation privileged and confidential information.
If you have received it in error, please notify the sender immediately
and
delete the original.  
Any other use of this email is prohibited.  


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql startup script problem

2003-07-09 Thread Duane Winner


On Wednesday 09 July 2003 17:49, Cory Lamle wrote:
> Contents are Direct Alliance Corporation CONFIDENTIAL
> -
>
> Duane,
>   Does mysql actually start back up? Or just get hung on step(4)?

Yes, mysql starts back up ok. I do a /etc/init.d/mysql start and the daemon 
starts just as it should. 


>
>   I know I have had problems running scripts over ssh because the sudo
> environment user wasn't being executed as root.  (where a cron_tab was
> actually executing the script).  Maybe make sure the env is trying to start
> the script as the correct user.

At first I suspected similiar problems, but then I realized that even if I'm 
sitting at the actual server console running mysql and do a /etc/init.d/mysql 
start, I get the same thing: I dont get bash shell command line returned to 
me. I guess that maybe this a bash scripting problem more than anything else?

I actually tried to edit the mysql startup script and played around with the 
'start' routine logic by inserting an 'exit', 'done' and 'break', but nothing 
here seems to work. Unfortunately I don't know enough about bash scripting 
that I should.



>
>
>
> -Original Message-
> From: Duane Winner [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 11:27 AM
> To: [EMAIL PROTECTED]
> Subject: mysql startup script problem
>
> Hello all -
>
> I'm having a small problem with the mysql startup script that ships with
> MySQL-3.23.56-1.
> I'm running on RedHat Linux.
>
> It works fine, but I have a backup server that runs a script that passes
> these commands remotely through ssh:
>
> (1) ssh dbsys-dc "sudo /etc/init.d/mysql stop"
>
> (2) ssh dbsys-dc "sudo tar
> czpf - /var" > dbsys-dc.var.$(date -I).tgz
>
> (3) ssh dbsys-dc "sudo tar czpf
> - /db" > dbsys-dc.db.$(date -I).tgz
>
> (4) ssh dbsys-dc "sudo
> /etc/init.d/mysql start"
>
> Essentially, what I'm doing is stopping the mysql server, then backing up
> the directories, the starting the server again.
>
> The problem is that I have additional commands in my backup script
> following line 4 above (backup additional filesystems and server, then
> write all the tarballs to tape), but the mysql start script does not exit
> properly after starting the mysql server, and I come in the next morning
> and find that my backup script is stuck on line 4 above, so the rest of my
> filesystems and servers never get backed up, nor get written to tape.
>
> If I do a "ps aux" and find the PID for that task and kill it, then the
> rest of my script will proceed.
>
> "mysql stop" seems to exit fine -- it's just "mysql start" that seems to
> keep the shell locked.
>
> Does anybody know how to fix this or a workaround?
>
> Thanks so much.
>
> Duane Winner
> [EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: mysql startup script problem

2003-07-09 Thread Cory Lamle
Contents are Direct Alliance Corporation CONFIDENTIAL
-

Duane,
Does mysql actually start back up? Or just get hung on step(4)?

I know I have had problems running scripts over ssh because the sudo
environment user wasn't being executed as root.  (where a cron_tab was
actually executing the script).  Maybe make sure the env is trying to start
the script as the correct user.



-Original Message-
From: Duane Winner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 11:27 AM
To: [EMAIL PROTECTED]
Subject: mysql startup script problem

Hello all -

I'm having a small problem with the mysql startup script that ships with
MySQL-3.23.56-1.
I'm running on RedHat Linux.

It works fine, but I have a backup server that runs a script that passes
these commands remotely through ssh:

(1) ssh dbsys-dc "sudo /etc/init.d/mysql stop" 

(2) ssh dbsys-dc "sudo tar
czpf - /var" > dbsys-dc.var.$(date -I).tgz 

(3) ssh dbsys-dc "sudo tar czpf
- /db" > dbsys-dc.db.$(date -I).tgz 

(4) ssh dbsys-dc "sudo
/etc/init.d/mysql start"

Essentially, what I'm doing is stopping the mysql server, then backing up
the directories, the starting the server again.

The problem is that I have additional commands in my backup script
following line 4 above (backup additional filesystems and server, then
write all the tarballs to tape), but the mysql start script does not exit
properly after starting the mysql server, and I come in the next morning
and find that my backup script is stuck on line 4 above, so the rest of my
filesystems and servers never get backed up, nor get written to tape.

If I do a "ps aux" and find the PID for that task and kill it, then the
rest of my script will proceed.

"mysql stop" seems to exit fine -- it's just "mysql start" that seems to
keep the shell locked.

Does anybody know how to fix this or a workaround?

Thanks so much.

Duane Winner
[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
This message is for the designated recipient(s) only and contains Direct
Alliance Corporation privileged and confidential information.
If you have received it in error, please notify the sender immediately and
delete the original.  
Any other use of this email is prohibited.  



mysql startup script problem

2003-07-09 Thread Duane Winner
Hello all -

I'm having a small problem with the mysql startup script that ships with
MySQL-3.23.56-1.
I'm running on RedHat Linux.

It works fine, but I have a backup server that runs a script that passes
these commands remotely through ssh:

(1) ssh dbsys-dc "sudo /etc/init.d/mysql stop" (2) ssh dbsys-dc "sudo tar
czpf - /var" > dbsys-dc.var.$(date -I).tgz (3) ssh dbsys-dc "sudo tar czpf
- /db" > dbsys-dc.db.$(date -I).tgz (4) ssh dbsys-dc "sudo
/etc/init.d/mysql start"

Essentially, what I'm doing is stopping the mysql server, then backing up
the directories, the starting the server again.

The problem is that I have additional commands in my backup script
following line 4 above (backup additional filesystems and server, then
write all the tarballs to tape), but the mysql start script does not exit
properly after starting the mysql server, and I come in the next morning
and find that my backup script is stuck on line 4 above, so the rest of my
filesystems and servers never get backed up, nor get written to tape.

If I do a "ps aux" and find the PID for that task and kill it, then the
rest of my script will proceed.

"mysql stop" seems to exit fine -- it's just "mysql start" that seems to
keep the shell locked.

Does anybody know how to fix this or a workaround?

Thanks so much.

Duane Winner
[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]