On 12 August 2013, Damon Getsman <[email protected]> wrote:
[...]
> Last night, however, when I decided to take another stab at things,
> googling turned up a result that I hadn't seen previously (I am
> google-tarded, so I will accept the possibility that I'd not done as
> straightforward an attempt to look for the answer of this issue as I'd
> thought). The link was at
> http://philihp.com/blog/2008/connecting-to-mysql-with-php-in-apache-on-openbsd/
> (2008? Certainly I must not have googled as well as I thought!),
> and referred to a permanent (although kludgy) solution found at
> http://www.openbsdsupport.org/e107_CMS.html .
>
> The solution was, indeed, dealing with creating a hardlink
> to somewhere within the chroot'ed jail; in this case under
> /var/www/var/run/mysql/mysql.sock after the appropriate path was
> created.
[...]
Please, stop repeating this nonsense. This "solution" works until
you restart the server manually, since mysqld removes the socket before
re-creating it.
The real solution is either to use TCP connections, or move the
socket inside the jail and make /etc/my.cnf and /var/www/etc/my.cnf
point to it accordingly.
Regards,
Liviu Daia