Sqlstate[hy000] [1045]

I have created a database that comprises 14 tables using the MySQL utility and phpMyAdmin. All is good when I work with the database outside of Wappler.

When I try to setup a database connection I get the error - SQLSTATE[HY000] [1045] Access denied for user x@localhost (using password: YES)

phpMyAdmin is showing the port to be 3306 and this is what I have used in the Server Connection (I have also tried 3308)

I have tried to connect to other databases on the same server and these connect OK.

Can you help please ?

Please check the user permissions for this database. It seems like the use doesn’t have permissions to access it.

Hi Teodor, see the screenshot - all privileges are granted.

To eliminate it being a wrong password for this user then I have created a new user with a different p/w and full access but I get the same error.

Could be the password as well, also the host - are you sure it’s localhost and not 127.0.0.1 for example?

I can’t understand why - but I have created a new empty database and user using the MySQL Wizard. Everything looks identical to before - but now it works…

I have exported and imported my tables so I am all set.

Thanks for your help.

1 Like