Jump to content

SQLSTATE[HY000] [1045] Access denied for user


Recommended Posts

hi!


my website is giving an error like this, from last three day, please help me to solve the problem, 


Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user 'xxxxxxx'@'localhost' (using password: YES)


i don't know whats wrong with it. www.brixton-beds.co.uk


please  help me to sort out this issue,


thanks


Edited by El Patron
removed db credentials for security reasons (see edit history)
Link to comment
Share on other sites

already tried to contact the hosting company, they said, the fault is on my end , dont where is the problem. need help please

 

what is your hosting control panel?  cpanel?

 

login to hosting, look for your databases, all info is there...

 

and also, find another hosting company...:)

  • Haha 1
Link to comment
Share on other sites

Ok, when i try to go to phpmyadmin

 

i get always a error and need to put the pass again.

 

The other thing, the database is 3MB, but a installation must be around6/9mb, so i think some database tables are lost

 

i recommend to restore a database backup

Link to comment
Share on other sites

  • 2 years later...

Hello guys,

 

 

I'd like to add something about this topic, that could maybe help someone,

I had the same error,

 

just try to go into your server, and look config, parameters.php ( or config)

You should have something like that

 

?php return array (
  'parameters' =>
  array (
    'database_host' => 'localhost',
    'database_port' => '',
    'database_name' => 'your dataname',
    'database_user' => 'your dataname',
    'database_password' => 'your password',
    'database_prefix' => 'ps_',
    'database_engine' => 'InnoDB',
    'mailer_transport' => 'smtp',
    'mailer_host' => '127.0.0.1',

 

 

see your hosting control panel for db info and setting of password and user, and correct if any mistake is.

it was my case.

 

bye guys,

Link to comment
Share on other sites

  • 1 year later...

Hi, I know this is an old post but I'm hoping it's the right place. I'm getting the same error and my parametres.php file is correctly configured.

The problem is I can't access some pages in the back office, I get 500 error. In the logs the SQLSTATE[HY000] [1045] Access denied for user error shows the credentials I was using in the dev site. Is there anywhere else they need to be changed apart from the parametres.php?

I connect to the front office with no problem and everything is working normally. 

 

Link to comment
Share on other sites

2 hours ago, kolomvos said:

Hi, I know this is an old post but I'm hoping it's the right place. I'm getting the same error and my parametres.php file is correctly configured.

The problem is I can't access some pages in the back office, I get 500 error. In the logs the SQLSTATE[HY000] [1045] Access denied for user error shows the credentials I was using in the dev site. Is there anywhere else they need to be changed apart from the parametres.php?

I connect to the front office with no problem and everything is working normally. 

 

Test this: 

open: var/cache/prod/ContainerXo3vxws/appProdProjectContainer.php 

around row 905, change the database config with your own.

Clean the web browser caché and restart your page. Good luck!

 

  • Like 4
  • Thanks 3
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
On 24/1/2019 at 6:15, Fabicii said:

Prueba esto: 

abrir: var / cache / prod / ContainerXo3vxws / appProdProjectContainer.php 

Alrededor de la fila 905, cambie la configuración de la base de datos con la suya.

Limpia el navegador web caché y reinicia tu página. ¡Buena suerte!

 

Thanks @Fabicii

This is the complete solution. 

 

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

@El Patron I just installed fresh 1.7.6.0. No upgrade, no server move. No 3rd party modules/themes etc. The installation has been completed as expected but then this problem:
SQLSTATE[HY000] [1045] Access denied for user

The strange part is that with the very same credentials when I pressed "Test connection" the success message appeared.

Do you have any idea about our new (1.7.6.0) baby and its flaws?

Link to comment
Share on other sites

8 hours ago, tapanda.gr said:

@El Patron I just installed fresh 1.7.6.0. No upgrade, no server move. No 3rd party modules/themes etc. The installation has been completed as expected but then this problem:
SQLSTATE[HY000] [1045] Access denied for user

The strange part is that with the very same credentials when I pressed "Test connection" the success message appeared.

Do you have any idea about our new (1.7.6.0) baby and its flaws?

hi, i don't think you posted the entire message..

try: prestashop/var/cache remove all files

I have not had time to look at 176, my advice unless one is just testing on development is to not upgrade unless you have good debug skills.  Remember the falcey of open source is that' it is community tested  lol....

 

Edited by El Patron (see edit history)
Link to comment
Share on other sites

  • 8 months later...
On 1/24/2019 at 1:15 PM, Fabicii said:

Test this: 

open: var/cache/prod/ContainerXo3vxws/appProdProjectContainer.php 

around row 905, change the database config with your own.

Clean the web browser caché and restart your page. Good luck!

 

Thank you very much! That fixed my issue too.

Link to comment
Share on other sites

  • 2 weeks later...

Hey, 

I have the same issue after trying to update to 1.7.6.0. 

Can somebody specify @Fabicii's solution? My code looks like this and I'm not sure where to add my database config exactly: 

 'prestashop.core.form.identifiable_object.builder.cms_page_form_builder' => 'getPrestashop_Core_Form_IdentifiableObject_Builder_CmsPageFormBuilderService.php',

Thank you! 

Link to comment
Share on other sites

On 4/14/2020 at 7:54 PM, tessa. said:

Hey, 

I have the same issue after trying to update to 1.7.6.0. 

Can somebody specify @Fabicii's solution? My code looks like this and I'm not sure where to add my database config exactly: 


 'prestashop.core.form.identifiable_object.builder.cms_page_form_builder' => 'getPrestashop_Core_Form_IdentifiableObject_Builder_CmsPageFormBuilderService.php',

Thank you! 

you must openn this file 

var/cache/prod/ContainerXo3vxws/appProdProjectContainer.php 

find this lines

 

            'database_host' => 'localhost',

            'database_port' => '',

            'database_name' => 'prestashop176',

            'database_user' => 'root',

            'database_password' => '',

            'database_prefix' => 'ps_',

            'database_engine' => 'InnoDB',

 

but change with your database data, you cna copy it from this file

 

app\config\parameters.php

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
On 24/1/2019 at 8:15, Fabicii said:

Prueba esto: 

abierto: var / cache / prod / ContainerXo3vxws / appProdProjectContainer.php 

alrededor de la fila 905, cambie la configuración de la base de datos con la suya.

Limpie el caché del navegador web y reinicie su página. ¡Buena suerte!

 

Intenté seguir este procedimiento pero no encontré en la línea 905 la información que decís en el archivo appProdProjectContainer.php 

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...