The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

problem when i am transferring database

Discussion in 'General Discussion' started by ljwhite, Apr 26, 2006.

  1. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    I want to transfer database from a.oscommerce(it means http://a.com/oscommerce) to b.oscommerce.
    I use phpmyadmin in cpanel to do it. I do it in the below two steps:
    1. i went to database:a.oscommerce->export, export it to my pc(filename: a.oscommerce.sql )
    2. i went to database:b.oscommerce->SQL->choose "a.oscommerce.sql" on my pc, but after this, i got an error:
    ...
    MSQL said:
    #1050--Table "addree_book" already exists

    What is the problem? what shall i do? Many thanks in advance.
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    This is telling you that line 1050 of the .sql file contains a query to create a table, but that the query cannot complete as the table already exists.

    If you're importing into a fresh new database, have a quick check and make sure that no tables are present before starting to import data.

    You may also want to try performing the export again, ensuring that you check the option "Add IF NOT EXISTS".
     
  3. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Actually both of databases are exactly the same. I just want to use database of a.oscommerce to overwrite the database of b.oscommerce. Shall i empty the database of b.oscommerce first?
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    The quicker option would be to go through the export again and ensure that you check "Add DROP TABLE".

    When you then import the data, existing tables will be deleted and recreated. A slightly better option just in case they table structures aren't 100% identical.
     
  5. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for your help!
     
  6. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    I got some other problems after i transferred database of a.commerce to database of b.oscommerce.
    1. When i log in b.oscommerce/admin, i have to input the same username/password as the a.oscommerce/admin. I went to "password protect directories" in cpanel to change, but it did not take effect. Is there a way that i can change the usernaem/password of b.oscommerce/admin?
    2. Because b.oscommerce is not live yet and i do not want people to visit it now, i went to "password protect directories" in capnel to set username/password for b.oscommerce (the whole website). But if am in b.oscommerce/admin, sometimes i also should input username/passord of b.oscommerce. I think i have to do this because b.oscommerce/admin is under b.oscommerce folder, so i have to input both username/password. Is there a way that i can avoid the problem?
    Many thanks in advance!
     
Loading...

Share This Page