http://bugzilla.novell.com/show_bug.cgi?id=499021 Summary: PHP PDO::mysql always connects to invalid socket Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Apache AssignedTo: bnc-team-apache@forge.provo.novell.com ReportedBy: jo@feuersee.de QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.10 (like Gecko) SUSE Using the PHP modules from the repo http://download.opensuse.org/repositories/server:/php/openSUSE_11.1/x86_64/ The PDO::mysql always tries to connect via UNIX socket /tmp/mysql.sock (unless another socket is specified). This socket does not exist due to MySQL configuration. Further, connecting via TCP with PDO using MySQL backend is not possible. Reproducible: Always Steps to Reproduce: $dsn = 'mysql:dbname=test'; $db = new PDO($dsn, $user, $passwd); Actual Results: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' in /home/wwwusers/preview.food-detektiv.de/htdocs/admin/PDO.php:13 Stack trace: #0 /home/wwwusers/preview.food-detektiv.de/htdocs/admin/PDO.php(13): PDO->__construct('mysql:localhost...', 'sqldrwatson', 'Karera1') #1 {main} thrown in /home/wwwusers/preview.food-detektiv.de/htdocs/admin/PDO.php on line 13 Expected Results: a database connection With openSUSE 11.1 the socket for MySQL is /var/lib/mysql/mysql.sock Specifying this socket as DSN works, however it is impossible to connect via PDO::mysql and TCP (eg. to another host) Defaults for PDO::mysql should be: - connect via TCP - hostname is localhost -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.