Re: "Couldn't select database." --> database DOES exist!!!
| From: | hentis at twilyt dot com | Date: | Tue, 09 Jan 2001 12:21:17 +0000 |
| Subject: | Re: "Couldn't select database." --> database DOES exist!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33442@lists.php.net to get a copy of this message | ||
hi there :)
I'm assuming you can access the database from your chell command using "mysql"
command
this doesn't use a port connection but a socket connection.
have a look at the mysql database and the setting int the hosts and user and db fields
is you acually have permissions to access the datatbase as the user from the host you are
connecting from even if it is the localhost
Henti Smith
On Tue, Jan 09, 2001 at 01:14:03PM +0100, Yoeri De Bruyn wrote:
> Hi,
>
> When I use this php calls on Win2000 configuration everything works
> fine, but migrating the site and DB to Linux, apparently the database
> can not be found!
> I use the following way to connect to my database:
>
> //create connection
> $connection = mysql_connect("localhost","","")
> or die("Couldn't connect to server.");
>
> //select database
> $db = mysql_select_db("searchDB", $connection)
> or die("Couldn't select database.");
>
> and I get : --> "Couldn't select database."
> PS: I can "browse" the DB on linux via command line without any probs,
> so?!
> If you feel like "damn! I've seen that once in my whole life!" (or even
> if you didn't) please tell me what you did to get rit of that feeling...
> ;-) !!!
> Thanks a llllllllot!
> Saludos,
> Yoeri.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net