• Resolved fernandolawl

    (@fernandolawl)


    I have a “How To” question.

    I exported my database from my website and the file is called shore_news.sql. I also exported it as locahost.sql.

    I want to import this through phpMyAdmin. I currently already have a wordpress installed and the database name is called shore_site2013.sql.

    How can I import shore_news.sql’s content to shore_site2013.sql? I tried to do “import” in phpMyAdmin and it didn’t work unless i have to click some other settings.

    Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Do you want to merge two databases or just want to replace the contents one with the other?

    Thread Starter fernandolawl

    (@fernandolawl)

    I believe what I want to do is replace the contents from the old sql file to the new one. But I need to keep the name of shore_site2013.sql.

    Follow the guidelines for restore process:
    http://codex.ww.wp.xz.cn/Restoring_Your_Database_From_Backup

    Before proceeding with the restoration/replacement, make backup copies of your databases so that you can use them if anything goes wrong.

    Thread Starter fernandolawl

    (@fernandolawl)

    Thanks. I tried to import shore_news.sql into shore_site2013.sql and phpMyAdmin gave me the following Error…

    Error
    SQL query:

    -- -- Dumping data for table<code>wp_links</code>-- INSERT INTO<code>wp_links</code>(<code>link_id</code>,<code>link_url</code>,<code>link_name</code>,<code>link_image</code>,<code>link_target</code>,<code>link_description</code>,<code>link_visible</code>,<code>link_owner</code>,<code>link_rating</code>,<code>link_updated</code>,<code>link_rel</code>,<code>link_notes</code>,<code>link_rss</code>) VALUES (1, 'http://codex.ww.wp.xz.cn/', 'Documentation', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), (2, 'http://ww.wp.xz.cn/news/', 'WordPress Blog', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', 'http://ww.wp.xz.cn/news/feed/'), (3, 'http://ww.wp.xz.cn/extend/ideas/', 'Suggest Ideas', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), (4, 'http://ww.wp.xz.cn/support/', 'Support Forum', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), (5, 'http://ww.wp.xz.cn/extend/plugins/', 'Plugins', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), (6, 'http://ww.wp.xz.cn/extend/themes/', 'Themes', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), (7, 'http://planet.wordpress.[...]
    
    MySQL said: Documentation
    
    #1062 - Duplicate entry '1' for key 'PRIMARY'

    Error #1062 shows duplicate entries. You may try either to delete the shore_site2013.sql and create a new database with the same name or just check all tables and drop them (select drop from the dropdown list – With selected) and then try to import shore_news.sql into the empty database.

    What I have done in the past when I need to import a database is to create a completely fresh, new database with nothing in it, then import. If you try to “overwrite” the current database, you will get errors to my knowledge. Is there any reason that you “must” use the current database? It’s rather simple to change which database wordpress uses in the wp-config file.

    The fresh database method is also safer, since you are not importing into your existing database.

    Thread Starter fernandolawl

    (@fernandolawl)

    Thanks got it to work

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Install/Merge sql database to new wordpress site (phpMyAdmin)’ is closed to new replies.