Re: How to shutdown mysql from Java

2006-03-21 Thread Alec . Cawley
"Rhino" <[EMAIL PROTECTED]> wrote on 21/03/2006 13:41:49:

> 
> - Original Message - 
> From: "Zsolt" <[EMAIL PROTECTED]>
> To: "MySql Mailing List" 
> Sent: Tuesday, March 21, 2006 2:58 AM
> Subject: How to shutdown mysql from Java
> 
> 
> > Hi,
> >
> > my application starts mysqld (via Runtime.getRuntime().exec) and I 
would
> > like to stop it also from Java (because of technical reasons I cannot 
use
> > mysqladmin).
> >
> > What is the best way stop shutdown mysqld?
> >
> > 1. FLUSH TABLES
> >
> > 2. Process.destroy()
> >
> > 3. kill PID auf Unix
> >
> > What do you think?
> >
> Most database management systems, like MySQL and DB2, are designed to 
run 24 
> X 7 with occasional breaks for maintenance like taking backups. Why do 
you 
> want start and start MySQL from an application? Isn't this going to 
preclude 
> most of the users from using it? After all, databases usually have large 

> numbers of users, not just one.

Obviously not in this case. While MySQL can do many things, it also works 
perfectly well as a single user repository. It is perfectly reasonable for 
a sing user to regard it as part of a single application and start and 
stop it from the application.

However, the cost of an inactive MySQL running all the time is tiny. And 
treating MySQL like this would cause problems if, for example, you wanted 
to run two such applications, because they would fight over it. Or if your 
application wanted to run on a PC which already had MySQL running for some 
other purpose. 

So I would suggest that it would be wisest to do as Rhino implies and to 
install MySQL and leave it running all the time.

Alec



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



Re: How to shutdown mysql from Java

2006-03-21 Thread Rhino


- Original Message - 
From: "Zsolt" <[EMAIL PROTECTED]>

To: "MySql Mailing List" 
Sent: Tuesday, March 21, 2006 2:58 AM
Subject: How to shutdown mysql from Java



Hi,

my application starts mysqld (via Runtime.getRuntime().exec) and I would
like to stop it also from Java (because of technical reasons I cannot use
mysqladmin).

What is the best way stop shutdown mysqld?

1. FLUSH TABLES

2. Process.destroy()

3. kill PID auf Unix

What do you think?

Most database management systems, like MySQL and DB2, are designed to run 24 
X 7 with occasional breaks for maintenance like taking backups. Why do you 
want start and start MySQL from an application? Isn't this going to preclude 
most of the users from using it? After all, databases usually have large 
numbers of users, not just one.


--
Rhino 




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.6/286 - Release Date: 20/03/2006


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



How to shutdown mysql from Java

2006-03-20 Thread Zsolt
Hi,

my application starts mysqld (via Runtime.getRuntime().exec) and I would
like to stop it also from Java (because of technical reasons I cannot use
mysqladmin).

What is the best way stop shutdown mysqld?

1. FLUSH TABLES

2. Process.destroy()

3. kill PID auf Unix

What do you think?

Zsolt



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