Within safe_mysqld, you can assign any pathname you want to the pid file and
then just make sure that the command to launch mysqld includes it as an
argument. After doing this, you will have what you want.

safe_mysqld:
-----------
:
:
$pid_file = /tmp/whateveryouwant.pid
:
:
:

if test "$#" -eq 0
  then
    (trap "" 1 ; exec $NOHUP_NICENESS
$ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR --user=$user 
--pid-file=$pid_file --skip-locking >> $err_log 2>&1 )
  else
    (trap "" ; exec $NOHUP_NICENESS
$ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR --user=$user 
--pid-file=$pid_file
 --skip-locking "$@" >> $err_log 2>&1 )
  fi


Jim Beigel
Alabanza Corporation
[EMAIL PROTECTED]

> -----Original Message-----
> From: Ben Kennish [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 01, 2001 9:33 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Antwort: PHP and MySQL - Default Socket Setting
>
>
> [EMAIL PROTECTED] wrote:
> >
> > On 01.03.2001 11:55:40 Ben Kennish wrote:
> >
> > > "Warning: MySQL Connection Failed: Can't connect to local MySQL server
> > > through socket '/var/lib/mysql/mysql.sock' (111) in
> > > /var/www/html/index.php on line 5"
> >
> > Are you sure that your MySQL installation creates the socket
> right there?  If
> > I'm not mistaken, it may be created in /tmp.
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
>
> No it was creating it in /var/lib/mysql but then PHP doesn't like this
>
> Thanks to you, we've managed to get it working using the following
> commands...
>
>
> mysqladmin shutdown
> safe_mysqld --user=root --socket=/tmp/mysql.sock &
>
> This works but would you happen to know how I can get NySQL to create
> the socket in /tmp/ at startup? (rather than having to shut it down and
> reboot with a new socket)
>
> Cheers,
>
> --
> Ben Kennish
>
> Software Developer
> Fubra Limited
>
> web   | www.fubra.net
> email | [EMAIL PROTECTED]
> phone | +44 (0)870 1222 600
> fax   | +44 (0)870 1222 699
>



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to