php or mysql problem?
| From: | Daniel Fosselius | Date: | Mon, 16 Aug 1999 15:03:46 +0000 |
| Subject: | php or mysql problem? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9883@lists.php.net to get a copy of this message | ||
Hi!
Im new on this list and have a problem with mysql.
I hope this is the right list.
anyway, I can't get mysql working with php.
this is the code:
$db = mysql_connect("localhost","dala","dala")
or die ("Could not connect to MySQL.");
$result = mysql_db_query("dala","select * from kategori", $db);
if(!$result) {
echo mysql_error($db);
exit;
}
the user, password and databasename is the same, "dala".
the error message i get is:
Access denied for user: '@localhost' to database 'dala'
i get this from the $result... row.
if I echo $db I get 1.
The weird part is that he sais user '@localhost'!
The user is "dala"! and i have wrote "dala" in mysql_connect.
i can connect manually, so thats not the problem.
i have tried everything.
i have connected to the test database in mysql, same error (but
different database of course).
i have installed php 3.0.12, mysql 3.22.25, apache 1.3.6.
i have recompiled them several times.
Nothing works!
Help me!
Best regards
Daniel Fosselius