$conn = mysql_connect("localhost","rentwall_rentwall",")X7zlBx)XgZ5")
	 or die ("Could not connect MySQL");
	mysql_select_db('rentwall_rentwall',$conn) or die ("Could not open database");
function post($postname)
	$posted = mysql_real_escape_string($postname);
	return $posted;

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'rentwall_rentwall'@'localhost' (using password: YES) in C:\wamp\www\site2\db.php on line 3
Could not connect MySQL

please someone help me with this i am not connecting with database
thanks in advance

Recommended Answers

All 3 Replies

This means that your password is not correct...

Member Avatar

I don't know why you would make your password )X7zlBx)XgZ5 ... My only suggestion is to use the root user and no password.

$conn = mysql_connect("localhost","root","");

This problem is not related to setting up password or that database connection is not established.

If someone come accross with this kind of problem I solved this by goinig into following steps:

Wamserver-->click on wampserver-->PHP-->php.ini file-->"ON" the short php tag

Always keep the short php tag "on" in php.ini file


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.