If its sporadic then its not because your connection string is wrong, its probably because your MySql database server is overloaded. What has your host said ?
This is just a problem with your MySQL server, almost certainly because of an overload, as Podge wrote. The overload can be caused by many things, but the sporadic nature of the issue makes it quite unlikely to be caused by hacking. Probably just one or more sites with loads greated than the server can handle, or someone running queries that tax a big load on the server.
Yep, I think you're just getting database timeouts - doubtless the MySQL server is shared and working too hard for other apps (the problem with cheap shared servers is that you never know what you're sharing with - and that can include some dreadfully inefficient code!