Unable to select database

From: Date: Thu, 29 Jun 2000 14:41:46 +0000
Subject: Unable to select database
Groups: php.db 
Request: Send a blank email to php-db+get-745@lists.php.net to get a copy of this message
Hi, I have a problem where my web pages seem able to connect to the mysql server, but I can't then select a database to use. My setup is: PHP Version 4.0.0 set up as CGI sun-solaris2.5.1 on sparc Netscape-Enterprise Server 3.5.1G Mysql 3.22.32 My code is: $hostname = "localhost"; $username = "uname"; $password = "pword"; $dbName = "dbname"; /* make connection to database */ @MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database"); @mysql_select_db("$dbName") or die("Unable to select database"); The page displays with the text "Unable to select database". I even restarted the mysql server with the --skip-grant-table option and get the same message, so I don't think its a mysql privilege issue. I can run the same code on my windows machine with PHP as an apache module with no problems. The Mysql server runs as a mysql user, and everything in the data directory is owned by the mysql user. I can access the databases fine from the mysql client. I am totally a newbie and would appreciate your help. Thanks Bruce bavander@excite.com _______________________________________________________ Get 100% FREE Internet Access powered by Excite Visit http://freelane.excite.com/freeisp

« previous php.db (#745) next »