Sometimes Drupal throws this error "PDOException: SQLSTATE[HY000]:2006 MySQL server has gone away..". This is due to low max allowed packet settings of mysql.
Find your mysql config file by using whereis.
Edit the configuration and include the below line
Thats it. Restart the service by issuing service mysql restart and try gain. There wont be any errors from now on :)
P.S: In case you are in shared hosting and cannot change this setting, refer https://drupal.org/node/1281408 to apply patch to work with low max_allowed_packet