Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Access denied for user 'xxxxxxx@localhost' using password[yes]


Recommended Posts

Hi, this is my php page


$hostname = "purehealths.com";

$db_user = "pureheal_amulya";

$db_password = "amulya";

$database = "pureheal_wordpress";

$db_table = "login";

echo mysql_error();

echo "hi";

mysql_connect("purehealths.com","pureheal_amulya","amulya") or die("can't connect");

echo mysql_error();

mysql_select_db("pureheal_wordpress") or die("canot select db");

echo mysql_error();




<title>How To Insert Data Into MySQL db using form in php</title>






$sql="select * from login where username='$userid' and password='$pass'";

$result = mysql_query($sql);



echo "could not successfully run query";




echo "<font face='verdana' size='2' color='green'>login failed</font>";




echo "<table colspan='2' width='100%'><tr> <td ><img src='C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\RRHealth_Logo copy.gif' width='100' height='100'/></td><td align='center'>"."<b><font face='verdana' size='4' color='green'>Preventive Health Care Admininstration </font></b></td> <td> <a href='http://localhost/build2.php'>Log Out </a></td>";

echo "<tr><td><font face='verdana' size='2' color='black'>Hi</font>".",<font face='verdana' size='4' color='orange'>".$row['name']."</font></td></tr>";

#echo "<tr><td align='center'>"."<b><font face='verdana' size='4' color='green'>Preventive Health Care Admininstration </font></b>"."</td></tr></table>";

#echo "<tr><td>"."YOUR INFORMATION IS :<br>"."</td></tr></table>";

echo "<table align='center' border='0'><tr>"."<td>";

printf("<font face='verdana' size='3'>UserName:</font>      %s<br />",$row["username"]);

printf("<font face='verdana' size='3'>password:</font>      %s<br />",$row["password"]);

printf("<font face='verdana' size='3'>E-Mail:</font>         %s<br />",$row["email"]);

printf("<font face='verdana' size='3'>Phone Number:</font>      %s<br />",$row["phnum"]);

printf("<font face='verdana' size='3'>Address:</font>       %s<br />",$row["address"]);

printf("<font face='verdana' size='3'>City:</font>       %s<br />",$row["city"]);

printf("<font face='verdana' size='3'>State:</font>       %s<br />",$row["state"]);

printf("<font face='verdana' size='3'>Services:</font>       %s<br />",$row["service"]);

echo "</td></tr></table><br><br>";




include 'library/config.php';

include 'library/opendb.php';

include 'library/closedb.php';










This is my html page test.html



<form action="test1.php" method="post">

username:<input type="text" name="uname">

password:<input type="password" name="pwd">

<input type="submit" value="submit">




I have the host detailes for my website.I have to add this to server.I created database in cpanel.username and password are same but iam getting warning as


mysql_connect() [function.mysql-connect]: Access denied for user 'pureheal_amulya'@'' (using password: YES) in /home/pureheal/public_html/test1.php on line 20.



Please give me a solution to get rid from this.Plzzzzzzzz iam trying from so many days.



Thank you inadvance.And sorry for looooooooong description

Link to comment
Share on other sites

Are you trying to edit an osCommerce or a Wordpress database, because if its Wordpress then as Chris alluded to, this is not the place for Wordpress support.

- Stop Oscommerce hacks dead in their tracks with osC_Sec (see discussion here)
- Another discussion about infected files ::here::
- A discussion on file permissions ::here::
- Site hacked? Should you upgrade or not, some thoughts ::here::
- Fix the admin login bypass exploit here
- Pareto Security: New security addon I am developing, a remake of osC_Sec in PHP 5 with a number of fixes
- BTC:1LHiMXedmtyq4wcYLedk9i9gkk8A8Hk7qX

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...