Topic: Unable to connect to MySQL server

I have reinstalled my forum in other host, and it was sucessful. It was working, but some hours late i get the message (debug on):

File: 72
Line: /var/www/html/include/dblayer/mysql.php

PunBB reported: Unable to connect to MySQL server. Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 

maybe mysql server is down? i dont think so, because i can connect using phpMyAdmin 2.5.4-rc2 and the host says that mysql server is up.

i tryed to change in config.php the "localhost" for "127.0.0.1" and i get:

File: 72
Line: /var/www/html/include/dblayer/mysql.php

PunBB reported: Unable to connect to MySQL server. Host 'localhost.localdomain' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts' 

i did that attempt because i read:

CheapJustice wrote:
Hi,

Are you running your site on an Ensim with Apache? Its probably due to the high security settings which forces php to run as a cgi.

You need to tweak some settings to the Database server hostname as follows:-

Instead of localhost, you use 127.0.0.1 to connect at port 3306


i know this is like a adminstration thing, but there is something to do before i try to reinstall my forum? reinstalling it will work?

Re: Unable to connect to MySQL server

Is it your own server? In that case, perhaps you should try 'mysqladmin flush-hosts' as the error message indicates.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3 (edited by Giacometti 2004-05-07 22:11)

Re: Unable to connect to MySQL server

no, its not my own server. Can i do that (flush-hosts) with phpmyadmin?

Re: Unable to connect to MySQL server

Problem solved. I looked at my host forum and i found that error occurs when the host is overloaded. Now its working again, but sometimes i get this error (weekends). Its a host problem, not punbb.

Thnx for your atention anyway.