$link = mysql_connect(\'localhost\', $username, $password); if (!$link) { die(\'Could not connect: \' . mysql_error()); }
I get this error:
Your $password variable is empty ((using password: NO)) then you trying log into www-data user without password, and server result is access denied. Propably this user have setted password.
$password
(using password: NO)
www-data