Page 1 of 1

PHP cannot connecto to mysql on opensuse 11.2

Posted: Tue Feb 15, 2011 2:46 am
by ulyses31
Hi everyone,

I'm having a problem using PHP 5.3.2 with MySQL 5.1.54 on an opensuse 11.2 box. My users can download files from my web server (users and passwords stored in database) but since last PHP update it stopped working.

Every time I try to download a file I get prompted for user and password and, even using correct credentials, it still asks for them.

At the apache 2 error_log I can see this:

MySQL ERROR: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13), referer: http://www.....

As the sock is located at /var/run/mysql/mysql.sock, I made a symlink /var/lib/mysql/mysql.sock and that did work until last PHP update. I think error code (13) means Access Denied (I'm not realy sure) but I tried to connect myself to mysql using credentials provided by PHP.

Has anyone had a similar problem? I don't really know how to proceed.

Thanks.