[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-java
Subject:    Re: starting mysql using java
From:       Paul Richards <Paul.Richards () Sun ! COM>
Date:       2004-04-22 20:02:23
Message-ID: 1082664142.7779.7.camel () drusilla
[Download RAW message or body]

Try starting a couple of threads that run in a loop reading from the
stdout and stderr streams of mysql.  Sometimes launching processes from
inside java can be arkward if you don't..





On Thu, 2004-04-22 at 07:49, M. Saravana Kumar wrote:
> Dear All,
> 
> Does any one tried starting Linux using java. I am using following code 
> snippet to start Mysql.
> 
> String commandToExecute ="sh mysql/startMysql.sh"
> 
> Process p = Runtime.getRuntime().exec(commandToExecute);
> p.waitFor();
> 
> 
> In the script I am just doing the following,
> 
> bin/safe_mysqld &
> 
> 
> In the above setup, when I am doing a Ctrl+C, I am getting the following 
> exception.
> 
> Communication link failure: java.io.IOException.
> 
> Also using Shutdown Hook, I am catching Ctrl+C and shut down mysql using 
> the following java code.
> 
> String commandToExecute ="sh mysql/startMysql.sh"
> 
> Process p = Runtime.getRuntime().exec(commandToExecute);
> p.waitFor();
> 
> In the stopMysql.sh I am doing the following
> 
> bin/mysqladmin -u root shutdown
> 
> While doing this, Mysql got crashed and it throws the following error.
> 
> 040422 19:17:37  /advent/latest/trans/mysql/bin/mysqld: Normal shutdown
> 
> mysqld got signal 11;
> This could be because you hit a bug. It is also possible that this binary
> or one of the libraries it was linked against is corrupt, improperly built,
> or misconfigured. This error can also be caused by malfunctioning hardware.
> We will try our best to scrape up some info that will hopefully help 
> diagnose
> the problem, but since we have already crashed, something is definitely 
> wrong
> and this may fail.
> 
> key_buffer_size=8388600
> read_buffer_size=131072
> 040422 19:17:37  InnoDB: Starting shutdown...
> 
> 
> Os: Linux 7.2
> Mysql Version: '4.0.13-pro'  socket: '/tmp/mysql.sock'  port: 3306
> 
> Please help.
> 
> regards,
> Saravanakumar
-- 
Paul Richards <Paul.Richards@Sun.COM>


-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/java?unsub=mysql-java@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic