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

Re: Mysql issues

On Sat, 2003-08-09 at 21:24, Stephen Schlather wrote:
> I am running OpenBSD 3.3 with apache chrooted.  I can connect to mysql
> with php and have set up my user permissions and everything else.  I
> have also performed "ln /var/run/mysql/mysql.sock
> /var/www/var/run/mysql/mysql.sock" in order to get it to work right
> under a chrooted environment.  However, as soon as I reboot my system,
> php can not access mysql giving me the following error:
> #2002 - Can't connect to local MySQL server through socket
> '/var/run/mysql/mysql.sock' (61)
> I have found that I can get it to work again by deleting
> /var/www/var/run/mysql/mysql.sock and then running the "ln" command
> again.

By default, /etc/rc deletes everything in /var/run at boot.  Modify the
following in your /etc/my.cnf file to keep your socket in an alternate

socket = /var/mysql/mysql.sock

Make sure to mkdir and chmod properly on /var/mysql.  Works great for

Jason Dixon, RHCE
DixonGroup Consulting