Note in the error message:
This either means you're not passing a password, or you're using mysql_connect, which is failing, and you've suppressed errors from it. Rather than suppressing errors, set your own error handler or switch to PDO and use exceptions.