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
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
Comment