Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't connect to local MySQL server through socket


Biancoblu

Recommended Posts

Posted

I've had this error on my site, on and off, for the last few months, without my changing anything. I confirm that I do not use persistent connections, and that my username and pw are correct, as well as my configure files.

 

I have spoken to host at length about it, they say this error happens during server restarts and that it typically goes unnoticed as it lasts for just seconds. Last time though it lasted for 20 minutes during which time my site was down.

 

I wonder if someone has an idea on what to do to possibly fix it?

 

Any advice welcome.

 

[26-Aug-2011 08:39:31] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/username/public_html/includes/functions/database.php on line 19

~ Don't mistake my kindness for weakness ~

Posted

The problem is the hosting service not the code.

 

Switch hosts.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

I've just had the same problem with my hosts, Isa - they offered me a new server - I said I would take them up on it if the problem persisted after the last downtime of 1.5 hours while they sorted it.

 

 

The problem switching hosts or server is the downtime involved - about 2 days to change hosts - 15 minutes to change server - if, of course, everything goes well

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Posted

Thanks for the replies I appreciate it.

 

A while back host suggested I move to a VPS plan so that they could tweak the MySQL service on the server to suite my needs, but I refused.

 

About a month ago they migrated everyone to new servers which are supposed to be better performing with better hardware, updated operating system etc, so I was hoping that would fix the issue but it didn't, in fact it's worse :(

 

This morning I posted a support ticket to which nobody has replied yet when they usually reply very quickly, perhaps they don't know how to fix the error? :D

~ Don't mistake my kindness for weakness ~

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...