Community

Local development of an existing website-DB import won't go through

I have to make some changes to an already existing website that uses Drupal 6. So here are the steps I took so far and the issues :

  1. Downloaded and installed MAMP 2.0
  2. Downloaded all the site's files (around 12GB... lots of PDF documents)
  3. Exported the database from the host : the file is around 40.7MB

I tried to import the DB in my local installation. I then read about the size limit. Then I increased the size limit by changing the values in php.ini. It is now set at 64M and memory of 96M.

Now : either it runs without any result. Or I get

import.php: Missing parameter: format

or

INSERT INTO `cache_menu` (`cid`, `data`, `expire`, `created`, `headers`, `serialized`) VALUES ('links:navigation:tree-data:8a38568279d673c738979506c49402e5', 0x613a323a7b733a343a2274726565223b613a3231363a7b693a313b613a323a7b733a343a226c696e6b223b613a33373a7b733a31343a226c6f61645f66756e6374696f6e73223b733a303a22223b733a31363a22746f5f6172675f66756e6374696f6e73223b733a303a22223b733a31353a226163636573735f63616c6c6261636b223b733a313a2231223b733a31363a226163636573735f617267756d656e7473223b733a363a22613a303a7b7d223b733a31333a22706167655f63616c6c6261636b223b733a31373a2273797374656d5f62617463685f70616765223b733a31343a22706167655f617267756d656e7473223b733a363a22613a303a7b7d223b733a353a227469746c65223b733a303a22223b733a31343a227469746c655f63616c6c6261636b223b733a313a2274223b733a31353a227469746c655f617267756d656e7473223b733a303a22223b733a343a2274797065223b733a313a2234223b733a31313a226465736372697074696f6e223b733a303a22223b733a393a226d656e755f6e616d65223b733a31303a226e617669676174696f6e223b733a343[...]
#2006 - MySQL server has gone away

And just to make sure I get the next steps right :

  1. Once I get the DB imported I have to change the settings.php file in my Drupal installation so it accesses the DB
  2. Log on the local site and do my thing

Any help is appreciated. But I'm not the best at server stuff. I am mainly a content manager just starting to play with more technical issues.

Thank you very much for any help you can give... even a topic redirection will be appreciated.

Comments

There's no guarantee that it

There's no guarantee that it will help in this case, but, generally speaking, cache should be emptied before moving the db.

Thought of that

It had no effect.
The export is already done after all cache are flushed.

Thinking it was a filesize issue although I increased the limit, I zipped the DB and tried importing it again. Result is : after a few seconds, the MAMP page goes blank (except for header and leftside column) and when I reload it, I see the DB with only 12 tables out of 154.

Thinking about wiping the entire MAMP installation and doing it again.

Any other solution would be GREATLY appreciated. Always available to give more info !

Teach me the ways of the drop master ! I'm an eager Padawan learner.

I have little experience with

I have little experience with specifically Mac, but here are some general suggestions:

* maybe something from this can be useful;

* you could as well try 'direct copy' ("IV method 2" here) from the remote db. It will be slower, but that's the point if your MySQL server is prone to flipping off.

I had the same issue when

I had the same issue when trying to copy an existing site to my local Windows dev machine.

I made the updates to my dev system listed above, but still no luck. The import got stuck on the cache_menu table. Flushing caches prior to exporting didn't help, so I tried exporting everything but that one table. It looked okay until I tried to flush the cache on my dev system and got this SQL error.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.cache_menu' doesn't exist: DELETE FROM {cache_menu} WHERE (cid LIKE :db_condition_placeholder_0 ESCAPE '\\') ; Array ( [:db_condition_placeholder_0] => admin\_menu:% ) in cache_clear_all() (line 176 of C:\wamp\www\mydb\includes\cache.inc).

So don't try that. It doesn't work so good.

Ultimately I went into phpMyAdmin, selected the cache-menu table and truncated it (deleted the contents) prior to exporting it. It imported just fine, and when I flushed the cache on my dev system the size of the menu-cache table went right back up, so I'm assuming everything is as it is supposed to be.

Update

I tried increasing the limits for file size and time and walk away fro the computer. Now the only error I get is about "format". This is frustrating.

I although thought I could import each table separately.

Any idea ?

Teach me the ways of the drop master ! I'm an eager Padawan learner.

Update 2 - It works !

So after struggling a lot, it finally worked.
I wiped the MAMP installation clean, optimized all the tables, emptied all cache and hoped for the best. DB came out at 32,3MB and imported without a hitch and in record time.
I don't exactly know what went wrong in the first place. But the important thing is: I can now work!
Thanks for the help.

Teach me the ways of the drop master ! I'm an eager Padawan learner.

Possible solution

I had the same issue in XAMPP on windows. Solved it by editing my.ini file in c:\xampp\mysql\bin and changing "max_allowed_packet" parameter from 1M to 10M.

Thanks it resolves the problem for me

Thanks a lot abszh
I'm using Wamp and have the same problem
and when i set the "max_allowed_packet" to 10M in the My.ini file; it resolves the problem for me

god is the greatest

nobody click here