DB::connect() and "No Such Database"

From: Date: Wed, 15 Jan 2003 03:11:41 +0000
Subject: DB::connect() and "No Such Database"
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3305@lists.php.net to get a copy of this message
Hi, I'm having trouble with my first "hello world" PEAR DB connection and I'm not sure what I'm doing wrong. My code is extremely generic: <?php require_once("DB.php"); $user="xxxx"; $pass="xxxx"; $db = DB::connect("mysql://$user:$pass@192.168.1.15/mysql",false); if(DB::isError($db)) { echo $db->getMessage(); } ?> And my error is "DB Error: No such database", however using the mysql command line with that host, user, pass and db I can log in ok (I'm confident that the mysql grants are OK) The interesting thing is that attempting with invalid usernames, invalid passwords, and nonexistent hosts I get the same error, which makes me think that something else is going on. I'd appreciate any troubleshooting tips. Regards, Gary

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