Uncaught PDOException: SQLSTATE[HY000]

I’m getting a PHP Fatal error: Uncaught PDOException: SQLState[HY000] [1045] Access denied for user ‘root’, after getting Warnings for Undefined variable’s which I’m fairly sure are defined.

The variables are not defined. Hence the warning.

The PDO exception is being thrown as your credentials cannot be used to log into the database. It looks like you haven’t set a password; PDO won’t allow a connection to be made without a password.

Yeah, got it figured out not to long ago. Thanks!

Sponsor our Newsletter | Privacy Policy | Terms of Service