Client Support Community Server Status Contact Us Client Login
Email Hosting Website Hosting Reseller Hosting VPS Hosting Dedicated Servers

    Join our Community      Check your private messages       Profile       Search       FAQ       Memberlist       Log in


Error - Can't connect to local MySQL server

 
Post new topic   Reply to topic    NetHosted Community Index -> FTP/SQL Support
gpk Reply with quote
 NetHosted Customer

 

 Joined: 06 Oct 2006
 Posts: 169
 

PostPosted: Fri Mar 30, 2007 12:53 pm    Post subject: Error - Can't connect to local MySQL server
 
Hi Andrew

A client tried to access our website this morning but received a MySQL error message. I've found the following in the cPanel error log:

[Fri Mar 30 10:43:29 2007] [error] 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/...

Can you shed any light on this? I've noticed occasional delay (2 - 3 secs "Waiting for <site>", usually response is instant) accessing some of our sites today, not sure if this is related

Ta

Giles

_________________
http://www.alexoria.co.uk  • Find New Business for Your Business
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Fri Mar 30, 2007 12:59 pm    Post subject:
 
Giles,

This simply means your client was trying to access your site during a MySQL restart, it is nothing to worry about.

Thanks,

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
gpk Reply with quote
 NetHosted Customer

 

 Joined: 06 Oct 2006
 Posts: 169
 

PostPosted: Fri Mar 30, 2007 1:04 pm    Post subject:
 
Does it happen often?
_________________
http://www.alexoria.co.uk  • Find New Business for Your Business
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Fri Mar 30, 2007 1:24 pm    Post subject:
 
gpk wrote:
Does it happen often?


It happened at that time as I restarted the MySQL server. The downtime would have been in the 1-2 second range so it is somewhat of a coincidence that your client managed to be trying to access your site at the exact same time!!

By the way the slight delays you would have been seeing was due to a IMAP server connection having somehow got in a loop. I've restarted the IMAP server now so hopefully this has been rectified for you (give it a few minutes to settle down).

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
gpk Reply with quote
 NetHosted Customer

 

 Joined: 06 Oct 2006
 Posts: 169
 

PostPosted: Fri Mar 30, 2007 2:11 pm    Post subject:
 
Many thanks for your comprehensive reply, as ever. Yes, everything is much more responsive now.

One final query - do you know how long error messages remain in the cPanel error log? And is is possible to download the error log/message history, as for access logs? Ths can be a useful way of trapping various problems of different kinds.

Ta

Giles

_________________
http://www.alexoria.co.uk  • Find New Business for Your Business
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Fri Mar 30, 2007 2:18 pm    Post subject:
 
I would suggest downloading them now as it's likely they'll get rotated tonight. cPanel (well logrotate) tends to rotate logs a few days before the end of the month.

Thanks,

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
Post new topic   Reply to topic    NetHosted Community Index -> FTP/SQL Support
Page 1 of 1

User Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

 
Jump to: