$link = mysql_connect(\'localhost\', $username, $password);
if (!$link)
{
die(\'Could not connect: \' . mysql_error());
}
I get this error:
I think the problem is that, you are trying to connect to the database twice. Somewhere in your code, you are already trying to connect to the database with username as "www-data"...... and again you are connecting to the database with username "root".
Also the password you are providing with the username "www-data" is wrong, thats y you getting the error message.