RE: [PHP] "Couldn't select database." --> database DOES exist!!!
| From: | William Bailey | Date: | Tue, 09 Jan 2001 14:16:22 +0000 |
| Subject: | RE: [PHP] "Couldn't select database." --> database DOES exist!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33457@lists.php.net to get a copy of this message | ||
RTFM: look at the MySQL docs, there is a whole section on the way the
access rights work (and is able to explain it beter then i could).
On 2001.01.09 12:38:10 +0000 Yoeri De Bruyn wrote:
> Yep! You got the bastard! Thanks a lot!!!
>
> look here the result:
> "Couldn't select database. MySql said: Access denied for user:
> '@localhost' to database 'searchDB'"
>
> Is there an easy way to create a user and determine his permissions on
> the DB?
>
> Thanx!!!
> Yoeri.
>
>
>
>
> Try adding mysql_error() to the die finction. It normally tells you
> exactly
> what mysql is trying to do and why it went wrong.
>
> e.g:
> $db = mysql_select_db("searchDB", $connection) or die("Couldn't select
> database. MySQL said: " .mysql_error());
>
> Thanks
> William.
>
>
> On 2001.01.09 12:14:03 +0000 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
> >
>
>
> --
> 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
>
--
Thanks,
William.