is there a way to get more info about *why* the initial (DB PEAR) connect to db is failing?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



my code:

	require 'DB.php';
	// $db=DB::connect('db_program://user:password@hostname/database');
$db=DB::connect('mysql://metheuser:mypass@xxxxxxxxxxxxxxxx/ 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

--

P.S.
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:
http://marc.info/?l=php-general&w=2&r=1&s=db+connect&q=b
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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux