From owner-freebsd-jail@FreeBSD.ORG Sat Dec 5 17:03:30 2009 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D89DC106568B for ; Sat, 5 Dec 2009 17:03:30 +0000 (UTC) (envelope-from mtzanidakis@gmail.com) Received: from mail-ew0-f216.google.com (mail-ew0-f216.google.com [209.85.219.216]) by mx1.freebsd.org (Postfix) with ESMTP id 6B0C78FC12 for ; Sat, 5 Dec 2009 17:03:30 +0000 (UTC) Received: by ewy8 with SMTP id 8so3942651ewy.35 for ; Sat, 05 Dec 2009 09:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=qgs8FDTD5V7DYNZ033ZyMvfr/zdmmarMRE8ZnonkRUI=; b=O42sWtrCqIJvjEQVT2eA08AxETVxb46gUUD+YVXoAKiFWtZCWmw9iiQFKX70KvP+m+ XL0G0ZDnYRpJ4UUheYxxmLqB0c8lW8mPNGhM/OJHiyeeaMHLuXLtRP2s64ZYkzX1v8Jo rWozyR7ahrorK7mhLnbwPs3yHaeNEC/qcNfGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=e/vxWP3ys1PtGYy2rp2zVffqc3UduBFUePo1F7joFl6b/DTWdKY4iRd5mXdZCmxhr6 j8n+jFdjNj60CKAdihl9HYMOn3aC7rjXSmR98ooDZJDsnaTeKISpNOMfS5LicohoBuVE +qHXlaEkxDGgBu8Kox4JzFgTi2AJqX7hquDoQ= Received: by 10.213.102.72 with SMTP id f8mr4681014ebo.26.1260031274566; Sat, 05 Dec 2009 08:41:14 -0800 (PST) Received: from zegebook.matza.local (athedsl-344590.home.otenet.gr [85.72.201.172]) by mx.google.com with ESMTPS id 14sm2465455ewy.7.2009.12.05.08.41.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Dec 2009 08:41:14 -0800 (PST) From: Manolis Tzanidakis Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 5 Dec 2009 18:41:12 +0200 Message-Id: <924B5EF7-AE3E-4A9E-B0D6-2FAC0151570A@gmail.com> To: freebsd-jail@freebsd.org Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) Subject: Cant't access mysql.sock (running on a jail) from a separate jail X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 17:03:30 -0000 Hello all, maybe this is already answered, but searching the list's archives was not working at the moment. Anyway, I've got a server running 8.0-RELEASE with various jails, all setup with ezjail. One jail is running mysql and another is running apache. I have a directory /usr/jails/mysqltmp (owned by mysql:mysql) on the host system, which is mounted in both jails as /mysqltmp with: /etc/fstab.mysqljail: /usr/jails/mysqltmp /usr/jails/mysqljail/mysqltmp nullfs rw 0 0 /etc/fstab.apachejail: /usr/jails/mysqltmp /usr/jails/mysqlapache/mysqltmp nullfs ro 0 0 (tried it also with 'rw', same results) I've setup my.cnf in mysqljail to write the mysql.sock socket in /mysqltmp and I can access mysql from this jail without problems, as expected. On the apachejail the socket shows up in /mysqltmp, however I can't connect: # mysql -S /mysqltmp/mysql.sock -u root -p ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/mysqltmp/mysql.socket' (2) I really need this because this setup will be replicated in a server farm with CARP and it will be serious PITA to modify all my web applications to access mysql using IP, besides the obvious performance advantages of UNIX sockets for MySQL. Any suggestions? Best, Manolis -- Manolis Tzanidakis mtzanidakis@gmail.com