Re: Trying to connext to MySQL with PEAR

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

 



On Thursday 06 January 2005 23:41, Jason Davis wrote:
> Hi all I am new to PHP and am trying to connect to mysql for the first
> time. 

In that case I strongly suggest that you at least vaguely familiarise yourself 
with using the basic PHP-native mysql_*() functions first. Go through the 
examples in the manual, learn how to:

- connect to the server
- select a database
- perform some simple queries
- retrieve the results of the queries
- handle errors

Whilst doing that you will have also confirmed whether your connection 
parameters (username/password/hostname/dbname) are correct.

> I get activity on the mysql monitor when I run it,  

What is this monitor? Doesn't it give any clearer indication of what is 
failing? Because this ...

> but get the following error.
> DB Error: connect failed

... seems to be an error produced by your Pear DB class and isn't very 
informative at all. If you do the above and use mysql_error() you'll get a 
more precise error message.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
New Year Resolution: Ignore top posted posts

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux