Database Connection Error


I’m trying right now to connect my Database on my localhost to my application. But I’m getting this error message:

Connect Error: SQLSTATE[HY000] [1045] Access denied for user ‘local’@‘localhost’ (using password: NO).

Does anyone have any tipps?

Thank you!

Hello Panstone,

can you show us how you are initializing your database? What does the code in your config file (global.php or local.php or any other config file you 're using) look like? Have you checked your database credentials before? Is local really the right user?

I 'm sure we can help you, when you 're showing us the settings for your database. The error message clearly says, that your credentials for accessing the database are not valid.

It specifically says you are not passing a password to the database so I’d check that first. Sometimes they put the username in the global,php and the password in the local.php if thats the case make sure its in local.php and not local.php.dist

Hope that helps