Jump to content

menu links give error: "Link to database cannot be established: SQLSTATE[HY000] [2002] Can't connect


Recommended Posts

Hi,

 

I installed prestashop 1.6, and I got the homepage succesfully

see http://188.226.208.8

 

But when I click on a menu link, for example "women", or "my orders" I get this error:

 

Link to database cannot be established: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

 

mysql is running well, I checked the socket (it is there) and my.conf settings, everything seems okay.

 

I find it very strange that I can see the homepage (so that means that the mysql can connect, no?), but not the menu links.

 

Please advise ;)

 

thanks!

 

 

Link to comment
Share on other sites

 

Ah thank you el patron, I did not see that !!

 

I have indeed changed the domain, and for that reason I had changed the address in the 'configuration' table fields for the DOMAIN in the database, but apparantly that is not enough?

 

Which other table fields need to be changed?

 

thanks a lot

Link to comment
Share on other sites

make sure to use relative links, not fully qualified links...

 

probably easier if you turn on friendly url...

 

But I haven't changed any links, this is a fresh prestashop 1.6 installation ...

Link to comment
Share on other sites

No, problem is still there

 

Prestashop saves the address of the website in the database, I do not know why, because it makes it very hard if the address changes, or if you change servers.

Link to comment
Share on other sites

  • 2 years 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...