How do I import MySQL db from 1 domain name to another?

Discussion in 'MySQL' started by khmntcpr8, Aug 30, 2009.

  1. #1
    Ok so I've recently purchased a 28mb sql file. it is basicly an anime wordpress database. i want to import it into my new fresh database. but im having issues with it.

    Somehow it has imported all the comments but none of the posts. Also each time i click go in the myPhPAdmin it gives me an error "MySQL said: Documentation
    #1062 - Duplicate entry '34' for key 'PRIMARY'"

    basicly this is the typical Duplicate Primary Key problem. I dont know how to fix it yet, also i'm concerned about all the links in the database linking back to the original site of the database seller, how can i change those all to my url? and how can i get rid of the duplicate primary keys problem???

    plz help!
     
    khmntcpr8, Aug 30, 2009 IP
  2. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #2
    I would import your sql file into a new database, as it sounds like something is conflicting with the database you are trying to import it into. Once you have imported the sql file into its own database, go into your config file for wordpress, and change the DB name, user and password to the new database.
     
    RHS-Chris, Aug 31, 2009 IP