I'm having trouble getting this line to work.  I have tried:

kill `cat /usr/local/mysql/bin/mysql/data/localhost.pid`
-> Not a directory
kill `cat /usr/local/mysql/data/localhost.pid`
-> Permission denied

I'm not sure if I have the wrong hostname, or if the command is more flawed
than that.  Furthermore, I need the command to work without requiring a
password or other response, because it is issued as a unix shell command to
initiate resetting the root password:

do shell script "kill `cat /usr/local/mysql/bin/mysql/data/localhost.pid`"
do shell script "/usr/local/mysql./bin/mysqld_safe --skip-grant-tables &"
do shell script "/usr/local/mysql/bin/mysqladmin -u root flush-priveleges
password '"&rootPassword&"'"
do shell script "/usr/local/mysql/bin/mysqladmin shutdown
do shell script "/usr/local/mysql./bin/mysqld_safe"


on 5/22/04 7:52 AM, Paul Bingman at [EMAIL PROTECTED] wrote:

> On Sat, 22 May 2004, John Mistler wrote:
> 
>> do shell script "kill cat /usr/local/mysql/bin/mysql/data/localhost.pid"
> 
> The kill command takes a numeric PID as its argument.  You need to get
> the pid out of the pidfile.  So to get the above to work you have to
> enclose cat and the filename in backticks:
> 
> kill `cat /usr/local/mysql/bin/mysql/data/localhost.pid`
> 
> This will run "cat /usr/local/mysql/bin/mysql/data/localhost.pid",
> getting the numeric pid from the file, then pass the pid to kill.
> 
> paul


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

Reply via email to