General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 3rd, 2003, 09:19 AM
vmacs vmacs is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 vmacs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
DB Connection error

i get the following error
Warning: Access denied for user: 'bluestone@localhost' (Using password: NO)
but the db is with the user - bluestone
and password-root

can any one help me
regardsing this

regards
Chandra Sekar

Reply With Quote
  #2  
Old March 3rd, 2003, 04:53 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Chandra,

Are you connecting through a script or through the command line?

What's the code you're using to connect?
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old March 3rd, 2003, 10:25 PM
vmacs vmacs is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 vmacs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
connecting mysql from PHP

When i connect through command prompt the system works fine.
When i connecting mysql thro' PHP i am gettin g following error

Warning: Access denied for user: 'root@localhost' (Using password: NO) in c:\apache\htdocs\order\ClsOP_Connection.inc on line 20

Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in c:\apache\htdocs\order\ClsOP_Connection.inc on line 20
Could not connect

code is

<?
include("ClsOP_Connection.inc");

$ObjConnection = new OP_Connection("localhost","root","root","Orderprocessing");

$ObjConnection->Open();
?>

//ClsOP_Connection.inc----included file
<?
include("ClsOP_Connection.inc");

$ObjConnection = new OP_Connection("localhost","root","root","Orderprocessing");

$ObjConnection->Open();
?>


//ClsOP_Connction.inc
<?
class OP_Connection
{
var $StrHost;
var $StrUserid;
var $StrPassword;
var $StrDatabase;
var $StrLink;

Function OP_Connection($THost, $TUserid, $TPwd, $TDatabase)
{
$this->StrHost = $THost;
$this->StrUserid = $TUserid;
$this->StrPassword = $TPwd;
$this->StrDatabase = $TDatabase;
}

Function Open()
{
$this->Strlink = mysql_connect($this->Strhost, $this->StrUserid, $this->Password)
or die ("Could not connect");
mysql_select_db($this->StrDatabase)
or die ("Invalid Data base");
}

Function Close()
{
mysql_close();
}

}

?>


Last edited by vmacs : March 3rd, 2003 at 10:31 PM.

Reply With Quote
  #4  
Old March 10th, 2003, 07:50 PM
rickwright rickwright is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Nova Scotia
Posts: 27 rickwright User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Function Open()
{
$this->Strlink = mysql_connect($this->Strhost, $this->StrUserid,

$this->Password

Should this be - $this->StrPassword

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > DB Connection error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT