Re: Trying to connext to MySQL with PEAR
| From: | Jason Davis | Date: | Thu, 06 Jan 2005 16:21:08 +0000 |
| Subject: | Re: Trying to connext to MySQL with PEAR | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38012@lists.php.net to get a copy of this message | ||
MySQL 4.1
PHP 4.3.10
PEAR 0.5.0 (I think, not sure how to test that)
On two different boxes
one is an XP Pro box
one is an Win2K Pro Box
both running IIS
"Richard Hutchins" <Richard.Hutchins@Getingeusa.com> wrote in message
news:1EA7D3AE70ACD511BE6D006097A78C1E0588813B@USROCEXC...
> What version of PHP?
> What version of MySQL?
>
> -----Original Message-----
> From: Jason Davis [mailto:cephme@yahoo.com]
> Sent: Thursday, January 06, 2005 10:42 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Trying to connext to MySQL with PEAR
>
>
> Hi all I am new to PHP and am trying to connect to mysql for the first
time.
> I get activity on the mysql monitor when I run it, but get the following
> error.
>
> DB Error: connect failed
>
> The lines of code are:
> require_once( "DB.php" );
> $dsn =
> "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME;
> echo $dsn;
> $isPersistant = TRUE;
> $db = DB::connect($dsn, $isPersistant);
>
> if ( DB::isError( $db ) ) {
> die ($db->getMessage());
> }
>
> The constants are properly defined and passing through to this page
(checked
> with echo), the database is created, the user has an account, and the
> account has rights to do all funcitons on the db. Any thoughts on what
might
> be wrong?
>
>
> Thanks
> Jason
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php