Have you ever been in situation where while building your drupal site using your local server, loading a page keep throwing ... mysql has gone away ... error?

You tried to rebuild the cache but the problem persist?.

The solution is ...

1. Put these lines in your my.ini mysql config file

max_allowed_packet = 100M // change the value to whatever you think is sufficient and not over limiting the available memory in the server
wait_timeout = 1000000000 // change this to whatever you think is enough

2. You can try to put this line in your php.ini

mysqli.reconnect = On

3. disable update module, database logging and syslog module.

4. check if your mysql configuration is configured with enough resources to process large chunk of sql queries. Warning! if your database uses InnoDB as it storage, changing the configuration may render your database corrupt.

A sample of safe my.ini configuration changes http://drupal.org/node/259580

Good luck in battling your mysql has gone away problem