INPUT query for cache_menu returns mysql #2006 error in MAMP This actually happens when I want to import a db from a live site to a local site in MAMP. 

Running mac osx 10.6.8 and MAMP 2.0.5.

I googled this mysql error and most people seem to have this solved by increasing the memory_limit value in /Applications/MAMP/bin/php5.3.6/conf/php.ini. I set it to 512M. And yes I made sure MAMP is running php 5.3.6.

...anyway increasing the memory size didn't solve the issue obviously

then I went looking at the error logs under Applications/MAMP/logs/php_error.log and Applications/MAMP/logs/mysql_error_log.err but both don't have any recent log information at all actually which is quite bizarre as well. 

What I can also tell you is that the last VALUE which the query wants to INSERT INTO 'cache_menu' is very very large. 

Here's the query that gives the #2006 error:

INSERT INTO `cache_menu` (`cid`, `data`, `expire`, `created`, `headers`, `serialized`) VALUES ('links:admin_menu:tree-data:9942fb041052f49f910af3e0190b9115', 0x613a323a7b733a343a2274726565223b613a31303a7b693a333635313b613a323a7b733a343a226c696e6b223b613a33373a7b733a31343a226c6f61645f66756e6374696f6e73223b4e3b733a31363a22746f5f6172675f66756e6374696f6e73223b4e3b733a31353a226163636573735f63616c6c6261636b223b4e3b733a31363a226163636573735f617267756d656e7473223b4e3b733a31333a22706167655f63616c6c6261636b223b4e3b733a31343a22706167655f617267756d656e7473223b4e3b733a353a227469746c65223b4e3b733a31343a227469746c655f63616c6c6261636b223b4e3b733a31353a227469746c655f617267756d656e7473223b4e3b733a343a2274797065223b4e3b733a31313a226465736372697074696f6e223b4e3b733a393a226d656e755f6e616d65223b733a31303a2261646d696e5f6d656e75223b733a343a226d6c6964223b733a343a2233363531223b733a343a22706c6964223b733a313a2230223b733a393a226c696e6b5f70617468223b733a373a223c66726f6e743e223b733a31313a22726f757465725f70617468223[...]
Backup and migrate exports the database automatically without (large) values in the cache_menu table. Thus, re-exporting the database using the backup and migrate module solved the issue.