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???
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???