From: acct dot php at povpromotions dot com
Operating system: apache
PHP version: 5.2.0
PHP Bug Type: PDO related
Bug description: Cannot connect to socket
Description:
------------
My ISP has implemented both MySQL4 and MySQL5. Because of this, I have to
connect to the MySQL5 database using a socket port on the connect:
localhost:/tmp/mysql5.sock
However, PDO fails to connect when I use this.
I have tried both:
$dbH = new PDO('mysql:host=localhost:/tmp/mysql5.sock;dbname='.DBASE,
DBUSER, DBPWORD );
$dbH = new PDO('mysql:host=localhost;port=/tmp/mysql5.sock;dbname='.DBASE,
DBUSER, DBPWORD );
The first returns this error:
Exception message: SQLSTATE[HY000] [2005] Unknown MySQL server host
'localhost:/tmp/mysql5.sock'
The second returns this error:
SQLSTATE[00000] [1044] Access denied for user: '[EMAIL PROTECTED]' to
database '*****'
which means it is pointing to the old MySQL4 db and is not using the
port.
I use many other connection methods that work fine with
host="localhost:/tmp/mysql5.sock"
Any help would be appreciated.
dbrucas
--
Edit bug report at http://bugs.php.net/?id=39672&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=39672&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=39672&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=39672&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39672&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=39672&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39672&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39672&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39672&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39672&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39672&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=39672&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=39672&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39672&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39672&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39672&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39672&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39672&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39672&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39672&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39672&r=mysqlcfg