Recent Topics

1 Feb 04, 2009 22:17    

My b2evolution Version: 2.x

This evening, I started getting this message when trying to access my blog:

+++++++
Additional information about this error:

MySQL error!

Error establishing a database connection!

(Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111))

1. Are you sure you have typed the correct user/password?
2. Are you sure that you have typed the correct hostname?
3. Are you sure that the database server is running?
+++++++

When I reported the fault to my ISP, I got this response back from them:

=====
Your sites script is trying to connect to MySQL on the wrong host.

Your trying to use "localhost" which is incorrect. We have corrected the issue by editing the host to "127.0.0.1" and you will find there are no more problems.

(localhost does sometimes work, but due to our secure environment it will not work 100% of the time. Changing your host as described above will permanently fix your issue).

Note this is not a problem with the hosting and is something you will need to fix with your script connecting to MySQL

Please let us know if we can be of any more assistance or you are unsure about anything mentioned above.
=====

Now given that the site has been running with b2evo at 0.9, 1.10 and now 2.6 for over two years on the same hosting, exactly as downloaded, I'm just a little perturbed that this should suddenly happen now. Does what they are suggesting make sense?

2 Feb 05, 2009 01:07

Does what they are suggesting make sense?

Yes

3 Feb 05, 2009 10:31

That's OK then. Just wondering what they changed and where they changed it now.

4 Feb 05, 2009 19:45

If you use localhost MySQL attempts to use a socket file (or named pipe), because it's much faster than the TCP/IP stack. Using 127.0.0.1 doesn't use the socket file

They probably disabled socket connections for some reason.

5 Feb 05, 2009 20:43

I was thinking more of them saying they'd edited the host - I'm just curious to know where that is accessed.

Also, they mention changing the script that's connecting to MySQL - which one would I look at for that?

6 Feb 05, 2009 21:16

You should edit the host in conf/basic_config.php to 127.0.0.1

7 Feb 05, 2009 21:23

OK, cheers. One more little job to sort out... ;)


Form is loading...