|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-29 11:32 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 21:00:02 2025 UTC |
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: '*****@localhost' 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