[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mysql under chroot apache



Odd, I simply copied the distributed my.cnf to /etc, changed the
socket to /var/www/var/run/mysql/mysql.sock for both client and
server. then in rc.local, /usr/local/share/mysql/mysql.server start

Works like a charm for me and apache.
kris


On Mon, 8 Nov 2004 21:51:26 -0600, Sean Kelley <sean_(_dot_)_ku_(_at_)_gmail_(_dot_)_com> wrote:
> Hi,
> 
> I have found that in order to get mysql to work under chroot apache, I
> have to use the following commands in rc.local:
> 
> if [ -x /usr/local/bin/mysqld_safe ]; then
>    rm -R /var/www/var/run/mysql
>    mkdir -p /var/www/var/run/mysql
>    echo -n " mysqld"; /usr/local/bin/mysqld_safe --user=_mysql --log &
>    sleep 10
>    ln /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock
> fi
> 
> I have to first blow away the old socket and path from apache's
> chroot.  Next I have to recreate it.  But I have to wait long enough
> so that it gets created in /var/run/mysql/mysql.sock.  I've tried
> editing my.cnf to make it point to /var/www/var/run/mysql/mysql.sock
> but it has never worked.  It would appear that these steps I have
> taken are 'learned' by word of mouth rather than documented.  Am I
> doing this right?
> 
> Thanks,
> 
> Sean
> 
> --
> Sean Kelley
> 
> 


-- 
"OBSD stands for OpenBSD and I hate you"



Visit your host, monkey.org