my code:

        require 'DB.php';
        // $db=DB::connect('db_program://user:passw...@hostname/database');
$db=DB::connect('mysql:// mydatabase');
        if (DB::isError($db)) { die("Can't connect: " . $db->getMessage()); }

is returning:
"Can't connect: DB Error: connect failed"

Any advise to find out WHY this is failing?
(Note: I am fairly new to PHP, and brand spanking new at anything db- related with PHP.)

thanks, Govinda


I realize this had probably been covered countless times (best step by step advice how to troubleshoot the first connection to a mysql db), so i first did try to search the php list archives, here:
and I am apparently missing something because when I input
"failed db connection"
at the top, in the search box, then it returns posts all over the map, and also takes out the middle word in my search string (so now it is just "failed db"). Why is that? I also searched for "failed database connection" which does not change my search input, but still the posts I found did not give me enough clue to stop me from posting here now.

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to