Handy SQL Snippets

 

SET GLOBAL max_allowed_packet=16*1024*1024;

 

Use this snippet if Drupal is giving you this error: user warning: Got a packet bigger than 'max_allowed_packet' bytes query:

 

DELETE FROM cache;

Used to delete all from table... replace "cache" with whatever table you want to delete all entries from.