You are here: Re: mysql_select_db doesn't work « PHP Programming Language « IT news, forums, messages
Re: mysql_select_db doesn't work

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация