On 2010-03-13, Sunnz <sun...@gmail.com> wrote:
> 2010/3/12 Daniel Gracia Garallar <danie...@electronicagracia.com>:
>> Not quite a solution, I think. What about if /var/www mounts in a different
>> filesystem than /var?
>>
>> Hardlinks from chrooted environments don't seem to be a wise solution
>> anyway... Just IMHO.
>>
>
> In that case you could change the location mysqld itself uses to be
> inside the chroot.

yes, this works well. borrowing from the notes in the drupal package;

-- -- --
In order to run with standard OpenBSD chroot'ed httpd:

- make sure you can connect to your database.

Create a directory for the mysql socket.

        mkdir -p /var/www/var/run/mysql

Adjust /etc/my.cnf to put the mysql socket into the chroot.

        [client]
        socket = /var/www/var/run/mysql/mysql.sock

        [mysqld]
        socket = /var/www/var/run/mysql/mysql.sock
-- -- --

if you have an application outside the chroot where you can't set
the socket path, you can create /var/run/mysql and create a symlink
in that directory pointing at the socket inside /var/www/var/run/mysql..

Reply via email to