Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14120 reviews 1680 hosting providers

Questions & Answers

Drupal problems during cache tables

Dec 8, 2013 by carebare
Hi all
I am having many issues when I try to import cache tables using MySQL and command lineI usually download the code for any upgrade and then export from the database using mysqldump . I usually load the database via mysql command line. And to go live with my modified db I do the same thing in reverse. I usually have problems only with cache tables containing content that causes mysql to hang or crash.  Does anyone know how to get around this?
Any help is appreciated
Many thanks

2 Answers

0 votes
Dec 8, 2013 by RalphK
Try clearing the cache tables before your export them. You can also get dump using the drush sql dump. check this http://drupaltraining.stanford.edu/node/85)
or youcan try using the  backup_migrate module
0 votes
Dec 8, 2013 by randy999
Try this code to create a list of the truncate commands .
SELECT DISTINCT concat("TRUNCATE TABLE ", YOUR_TABLE_NAME, ";") FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'DATABSE_NAME' AND YOU_TABLE_NAME LIKE "cache_%";