I'm building a website with a login using php and mysql. When I try to connect to the database I keep getting error:
Notice: Could not connect to MySQL: Access denied for user 'User'@'localhost' (using password: YES)
I have tried to set a new password or no password but keep getting this error. Does somebody know how to fix this?
I noticed this error also occurs when using mysql with java apps
I'm using phpMyAdmin with wamp
Edit: Here is the code. I replaced Username, Pass and Database by User, Pass and Database
DEFINE('DATABASE_USER', 'Username');
DEFINE('DATABASE_PASSWORD', 'Pass');
DEFINE('DATABASE_HOST', 'localhost');
DEFINE('DATABASE_NAME', 'Database');
date_default_timezone_set('Europe/Brussels');
DEFINE('EMAIL', 'user@email.com');
DEFINE('WEBSITE_URL', 'localhost/wadistjom');
$dbc = @mysqli_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD, DATABASE_NAME);
if (!$dbc) {
trigger_error('Could not connect to MySQL: ' . mysqli_connect_error());
}