Re: Re: Database error (More Details)

From: Date: Mon, 08 May 2006 16:59:36 +0000
Subject: Re: Re: Database error (More Details)
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24000@lists.php.net to get a copy of this message
On 5/8/06, Mark Wiesemann <wiesemann@php.net> wrote:
moses@softwaysolutions.com wrote:
     require_once 'DB.php';
     $dsn = 'mysql://root:@localhost/student';
     $db =& DB::connect($dsn);
     if(PEAR::isError($db))
     {
        die($db->getMessage());
     }
     echo "<br> Database Connected Sucessfully";
The code looks good.
    THE  USER TABLE IN MYSQL contains the following users
-----------------------------------------
       Host           User     password
-----------------------------------------
   localhost         root
      %              root
localhost
      %
----------------------------------------- This could be the problem. Looks like if every username would be accepted here. You can try this yourself via mysql on a shell.
Exactly. Your users table says that Any use is allowed access from any host. You should have tried to do a query and seen if that worked before complaining that DB wasn't catching an error. No error happened. -- Justin Patrin

« previous php.pear.general (#24000) next »