Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

import my database


zpupster

Recommended Posts

hello support,

 

i installed oscomm 2.3 on a remote and i also installed it on my local.

 

i am now trying to import a product database on my local. i could not import without errors.

 

so as a work around i exported as a .sql file.

 

and pasted it it wamp, phpmyadmin, named a database, and pasted the sql code in the sql space.

 

pressed go and it stops at a configuratin table with this error.- ( the other tables above configuration are present)

 

 

#1062 - duplicate entry '480' for key 'primary'

 

i went to the remote server where i got it from and did not see any primary field marked,

but there was an auto increment field and sorted and saw no duplicate for 480.

i ran it a few times and keeps stopping there at 480.

 

now i could try and export and import all the tables 1 by 1. and try to rebuild the configuration table.

is there a way to continue with the sql for the rest of the tables?

 

if someone could give me some advice here, how to deal with this error.

 

i have some familiarity with this but not much , so if you could keep the answer simple.

 

thanks,

 

craig

Link to comment
Share on other sites

Is the database that you are importing into empty? If not, truncate the table before importing. You could also drop the table and have them imported database rebuild it. It all depends on how your backup was written.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

hello, thanks for the reply--kymation.

 

yes,

 

i backed up the remote db without compression in oscomm. and downloaded the .sql file and saved it locally.

 

 

created a database that is empty.

 

and then copied and pasted the sql in sql in phpmyadmin.

 

 

i could not get the import to work. it had saved the information_schema and errored as such i tried to delete those lines ,

but that didnot work--that is why i used the sql method

 

 

 

craig

Link to comment
Share on other sites

You should not try to save the information_schema part; that will be generated by the new database. Just save the actual database that you used for osCommerce.

 

You may be having a problem with different versions of MySQL. I don't know without looking. You can try to separate out the tables, or export one at a time if you still have access to the old database. Doing it one at a time will make errors easier to fix.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

hello kymation,

 

bingo!!!

 

i went back and tried to import again. received a timeout at 300 seconds, but 43 tables were imported.

 

after investigation, this was added to phpmyadmin-->>

 

config.inc.php file

changed 300 to 1200

 

// maximum execution time in seconds (0 for no limit)
$cfg['ExecTimeLimit'] = 1200;

 

imported again and that was successful.

 

my db is only 1.83 mb, my server must be slow.

 

one last thing if you do not mind--

 

where and how to change the file to access my new database rather than the sample one in oscomm2.3.

 

 

thanks again,

 

craig

Link to comment
Share on other sites

The database settings are in catalog/includes/configure.php and catalog/admin/includes/configure.php, near the bottom of each file.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...