Help - Search - Members - Calendar
Full Version: Connecting to a database
HTMLHelp Forums > Programming > Databases
tudsy
hI

I am trying to connect to a database but i get this error:


Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'ecovibdc'@'localhost' (using password: YES) ?>


Attached is the file in question.


Thanks in anticipation.


Adrian T.
CharlesEF
That tutorial is dated in 2006. You should find a newer tutorial instead. Also, write your Database connection code by itself so you know if it works. You can always add it into the code later. Not to mention you assembled the code badly.
Themeaxe
You can try this code for solving this error:

private $host = "localhost";
private $db_name = "db_dbtest"; // Database name
private $username = "db_user"; // your database username
private $password = "db_password"; // Your password
public $conn;
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.