If you plan on using MySQL a lot I suggest you buy the book MySQL written
by Paul DuBois. You might start by reading information on www.devshed.com
(click on MySQL, click on PHP) and www.php.net (click links)
Bye,
B.
-
Bef
- Original Message -
From: "Kevin Donnelly" <[EMAIL PROTECTED]>
To: "josep" <[EMAIL PROTECTED]>
Sent: Tuesday, December 11, 2001 11:27 AM
Subject: Re: PHP+MYSQL: unable to select database
> Hi Josep
>
> > It is a php guestbook
Hi Josep
We have to be clear about definitions.
You seem to be making a couple of mistakes here:
1 - guestbook.sql is not the db, but probably a script to create the db (you
can check by opening it in a text-editor - it will probably have a CREATE
TABLE statement at the top, then the field defin
Hi.
First, please avoid cross-posting.
Try to narrow down the problem by trying from the command line client
(i.e. try to rule out PHP as source of the problem). If that doesn't
work, try the PHP list.
If you are successful, it belongs to the MySQL list (as PHP is no
longer part of the problem)
One of three issues:
1 - the db is not set up correctly;
2 - the user is not set up correctly;
3 - the PHP script is not calling the db properly - this could be due to
wrong syntax, misnaming of the db table, or incorrect username parameters.
You would need to post some more info, in particular
I can't select a database from a php script.
I've set privileges in both the user and the data base tables
and I've done FLUSH PRIVILEGES;
WHY?
JOSEP.
-
Before posting, please check:
http://www.mysql.com/manual.php (the
I get:
unable to select database
when I visit my guestbook.php
The user trying it is set in the mysql.user (without any perms) and in the
mysql.db (with all perms).
Do I have to set all perms to this user in the mysql.user table?
Josep
--