The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Connecting to a database
tudsy
post Oct 24 2015, 11:33 PM
Post #1


Advanced Member
****

Group: Members
Posts: 179
Joined: 30-September 14
Member No.: 21,611



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.


Attached File(s)
Attached File  capture.php ( 3.81k ) Number of downloads: 959
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Themeaxe
post Jul 18 2016, 08:23 AM
Post #2


Newbie
*

Group: Members
Posts: 10
Joined: 18-July 16
Member No.: 24,423



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;
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 22nd November 2019 - 08:21 AM