note 48951 added to ref.mysql

From: Date: Wed, 12 Jan 2005 19:58:02 +0000
Subject: note 48951 added to ref.mysql
Groups: php.notes 
Request: Send a blank email to php-notes+get-83168@lists.php.net to get a copy of this message
I tried to use php to connect to database 'test' and got following message: Connected successfully. Can't use test : Access denied for user: '##@##.##' to database 'test' Here is the code: $link = mysql_connect('##@##.##',user, passwd) or die('Could not connect: ' . mysql_error()); echo 'Connected successfully.<br>'; $db_selected=mysql_select_db("test",$link); if (!$db_selected) { die ('Can\'t use test : ' . mysql_error()); } Please help. Thanks. ---- Manual Page -- http://www.php.net/manual/en/ref.mysql.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48951 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48951&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48951&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48951&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48951&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48951&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48951&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48951&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#83168) next »