Jump to content

Error: Exception: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket


Lars282
 Share

Recommended Posts

Hey all,

Since the last migration of a PW website to a new hosting provider, I keep receiving the following error notifications per email every couple of weeks / months (very rarely):

Page: http://example.com/?/
User: ?

Error: 
Exception: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (in /home/aglobalv/public_html/wire/core/ProcessWire.php line 143)

Any idea why this could be? Does it mean that the SQL server of my hosting provider is temporarily down?

Many Thanks

Lars

  • Like 1
Link to comment
Share on other sites

I will assume that you have migrated doing a clean install on your server. Review your db config or contact with your hosting.

If you migrated your database without installing my recommendation is to do a clean install and read this:

https://processwire.com/talk/topic/5736-export-profile/#entry56006

Edited: The migration process is too simple. What is your hosting?

Link to comment
Share on other sites

In general, everything works fine - the website is up and running after the migration.

Still, I get this email every couple of weeks / months, but even when I try to access my website immediately, everything seems to work.

I have a different website with the same hosting provide that does not give me these errors ...

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...