Priviet, I should have written that my sock has the proper permissions # ls -la /var/www/var/run/mysql/mysql.sock srwxrwxrwxB 5 _mysqlB daemonB 0 OctB 4 23:04 /var/www/var/run/mysql/mysql.sock
However the hard link has other permissions # ls -la /var/run/mysql/mysql.sock lrwxr-xr-xB 1 rootB _mysqlB 33 OctB 4 23:08 /var/run/mysql/mysql.sock -> /var/www/var/run/mysql/mysql.sock I suppose this is normal >________________________________ >DeB : pavel pocheptsov <lilit-aibo...@mail.ru> >CB : misc@openbsd.org >CcB : Mik J <mikyde...@yahoo.fr> >EnvoyC) le : Jeudi 6 Octobre 2011 11h11 >ObjetB : Re: Php cannot connect to mysql > > >Mik J P?P8QP5Q: > >># ls /var/www/var/run/mysql/ >>mysql.sock >> >>I hard linked it to /var/run/mysql/ >># >>ln /var/www/var/run/mysql/mysql.sock /var/run/mysql/mysql.sock >> >> >># ls -la /var/www/var/run/mysql >total 8 >drwxr-xr-xB 2 _mysqlB _mysqlB 512 Sep 21 21:14 . >drwxr-xr-xB 3 rootB B B daemonB 512 Apr 21B 2010 .. >srwxrwxrwxB 1 _mysqlB _mysqlB B B 0 Sep 21 21:14 mysql.sock > >use chmod to change owner to mysql-user