|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
Function Open()
{ $this->Strlink = mysql_connect($this->Strhost, $this->StrUserid, $this->Password Should this be - $this->StrPassword |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > DB Connection error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|