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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

[SOLVED] Urgent help needed - MySQL and migrating sites


Go to End


5 Posts   1482 Views

Avatar
Harley

Community Member, 165 Posts

28 March 2010 at 2:15am

Edited: 28/03/2010 4:18am

Hello,

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

Thanks

Avatar
patjnr

Community Member, 102 Posts

28 March 2010 at 2:25am

Hi

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.

ta

Avatar
Harley

Community Member, 165 Posts

28 March 2010 at 4:17am

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

Thanks again

Avatar
patjnr

Community Member, 102 Posts

28 March 2010 at 4:22am

What solution work for you.

Avatar
Harley

Community Member, 165 Posts

28 March 2010 at 10:29pm

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