|
Posted by jimp on 06/24/05 17:29
bettina@coaster.ch wrote:
> Hello,
> I'm trying to connect a DB but I can't. Can anybody help me?
> Here is the piece of code...
> <?php
> $verbindung = mysql_connect("localhost", "coasters", "");
> if (!$verbindung) {
> die('Not connected : ' . mysql_error());
> }
> // make coaster the current db
> $db_selected = mysql_select_db('coaster', $verbindung);
> if (!$db_selected) {
> die ('Can\'t use coaster : ' . mysql_error());
> }
> ?>
> I get the following message:
> Can't use coaster : Access denied for user ''@'localhost' to database
> 'coaster'
> The connection to the server seems to work.
> I have installed WAMPP2 and I use Macromedia Dreamweaver. I save the
> file as PHP and I send it to my webserver. The DB is local under
> MySQL\data. Do I have to send the DB to the server where I test, too?
> Thanks
Specify a user that has access to coaster from localhost.
--
Jim Pennino
Remove .spam.sux to reply.
Navigation:
[Reply to this message]
|