Lose MySQL database connection


I was posting same question about MySQL db connection issue week ago or so but not in appropriate topic ( Mysql problem please help me ) . I see this topic might be the correct one so I’m again reporting same MySQL db connection issues that keep appearing from time to time not only in my web application scripts but also in phpMyAdmin!

Inside my custom PHP scripts I’m getting error "SQLSTATE[HY000] [2002] Connection refused”

And in phpMyAdmin when I try to dump whole database into .sql file some interruption happens on MySQL server side making dumping process to stop and downloads incomplete .sql file. Inspecting this incomplete .sql file I can find error saying : #2006 - MySQL server has gone away !

Regarding my case, this MySQL connection error was not appearing before although I’m still using free hosting account for more over than a year.

Can You tell me if this issue is happening on Your side or there is something I should check more and how this issue can be resolved?

Thank You,
Best regards