Acces denied for user

JodokusKwak

New member
Joined
Mar 10, 2012
Messages
5
I use this routine to connect to the MySQL-database:
function makeconnection() {
// use: $connection = makeconnection();

$result = mysql_connect("localhost:3306","{username}","{password}");
if (!$result) {
die('Could not connect: ' . mysql_error());
}
return $result;
}

and the system returns with this warning:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user '{username}'@'localhost' (using password: YES) in {path}login.php on line 6
Could not connect: Access denied for user '{username}'@'localhost' (using password: YES)


In PHPAdmin I can access the database with the {username} and {password}.
I have not set a ini-file, simple I don't know where to set this file. Is this maybe the problem???:confused:
 
No more ideas then.

If you want I can check your server, but it will cost you some USD. Feel free to PM me if you're interested.
 
I have solved the problem by re-installing some files. Don't know what I did wrong before, but it worked.
The only thing now is that I hit syntax-errors, but I hope to resolve these by myself.
Thanks for your help.
 
I reset my PHP-files and I also reset the users authentication in the database (to the same settings) and after that it worked. Beets me, but that is passed so I don't look back.
 
Back
Top