Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

[SOLVED] Urgent help needed - MySQL and migrating sites


5 Posts   945 Views


28 March 2010 at 2:15am (Last edited: 28 March 2010 4:18am), Community Member, 153 Posts


I'm migrating my sites this weekend to a new hosting provider, I've uploaded one of my silverstripe sites but I'm hitting an error when importing the database tables. Basically for each page type in the database it is throwing up a mysql " #1062 - Duplicate entry '32' for key 'PRIMARY' " error message.

There is no duplication in the database, the ID field is set to 'int(11)' so by my understanding everything should be ok.

Anyone else ever experienced this?

Any help or advice will be most appreciated



28 March 2010 at 2:25am Community Member, 101 Posts


try dropping every table in your DB and copy the mysql dumb. in Myphpadmin click on SQL and NOT import this time and paste your dumb in and go.

thats how i do it without any problems.

yell if not working.



28 March 2010 at 4:17am Community Member, 153 Posts

Thank you so much, it seems to obvious now! Worked like a charm!

Thanks again


28 March 2010 at 4:22am Community Member, 101 Posts

What solution work for you.


28 March 2010 at 10:29pm Community Member, 153 Posts

Here are the steps I had taken:

1. Export database with Compression set to 'none' from the original database
2. Copy and paste the database which is displayed in the window (paste it into a txt file to be safe if you wish)
3. Open phpMyAdmin on the server I wish to migrate to.
4. Click on 'SQL' and paste into the window the database I copied earier
5. Hit ok and everything goes in perfectly

These are the little things that are sometimes good to know. Atleast there is a post here now for future reference.

Thanks again for your help