mysql.sock and jails

GiZmen gizmen at
Tue Mar 7 22:07:53 UTC 2006


I am a user of freebsd 6.0 box. I have couple jails on this box.
One of them are closed apache and mysql. Mysqld creates mysql.sock
for local connections in /tmp dir inside it's jail. Second jail
where i have apache runnig needs to connect to mysqld. Right now
it connect tru IP connection to database. I have recently tried to 
mount_null /tmp dir from mysql jail to some dir in httpd jail.
There where no problem. I can see mysql.sock in httpd jail but
i can't connect to database through this socket. It says
only that it can't connect through this socket to database.

I have tried also to hard link mysql.sock from mysql jail to 
httpd jail and this is working fine. But option with mount_null
is easier for me and i would like use if it possible.

Could anyone tell that is it possible to achieve this ??
I am plannig to run more services which will need access to mysql
and i thought that i will can use mount_null feature to propagate
mysql.sock to each jail.

Yes i know that i can use IP communication but AFAIK connections
through socket is faster than IP.

Thanks for any suggestion

Best Regards:

UNIX is user-friendly; it's just picky about its friends
UNIX is simple; it just takes a genius to understand its simplicity

More information about the freebsd-hackers mailing list