Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Uploading local database


tbarrie

Recommended Posts

Posted

OCS store works perfectly on my local machine/server. Can't figure how to get it all uploaded to domain site.

 

1. Develop store. Works. Export DB.sql.zip

 

2. Installed nesw OSC to domain with fantastico. Looks and acts just like original "demo" setup. Using phpMyAdmin to import database: stops at first table (address_book, I think), claims error and quits. DB remains unchanged.

 

3. Tried running installer on fantastico installation (hoping I could import/replace the DB) but couldn't find option to import.

 

Seems there should be an easy "fix" but I guess I'm being too dense.

 

Thanks,

Posted
OCS store works perfectly on my local machine/server. Can't figure how to get it all uploaded to domain site.

 

1. Develop store. Works. Export DB.sql.zip

 

2. Installed nesw OSC to domain with fantastico. Looks and acts just like original "demo" setup. Using phpMyAdmin to import database: stops at first table (address_book, I think), claims error and quits. DB remains unchanged.

 

3. Tried running installer on fantastico installation (hoping I could import/replace the DB) but couldn't find option to import.

 

Seems there should be an easy "fix" but I guess I'm being too dense.

 

Thanks,

 

Stupid question, but I'll ask anyways... did you try uploading the sql into the backups folder and do a restore from the admin in osCommerce?

 

hth

 

TJ

Posted
OCS store works perfectly on my local machine/server. Can't figure how to get it all uploaded to domain site.

 

1. Develop store. Works. Export DB.sql.zip

 

2. Installed nesw OSC to domain with fantastico. Looks and acts just like original "demo" setup. Using phpMyAdmin to import database: stops at first table (address_book, I think), claims error and quits. DB remains unchanged.

 

3. Tried running installer on fantastico installation (hoping I could import/replace the DB) but couldn't find option to import.

 

Seems there should be an easy "fix" but I guess I'm being too dense.

 

Thanks,

 

When you exported, you may have had "structure" checked (in phpMyAdmin). When you try to import into the new database, it tries to create the structure that's already there, and doesn't like it! Either re-export with "structure" unchecked, or drop all 46 tables before you try to import. The import will re-create the tables.

 

If I'm wrong, then post the actual error message.

Posted
When you exported, you may have had "structure" checked (in phpMyAdmin). When you try to import into the new database, it tries to create the structure that's already there, and doesn't like it! Either re-export with "structure" unchecked, or drop all 46 tables before you try to import. The import will re-create the tables.

 

If I'm wrong, then post the actual error message.

 

Tried it:

 

Error

SQL query:

 

-- phpMyAdmin SQL Dump

-- version 2.8.0.3

-- http://www.phpmyadmin.net

--

-- Host: localhost

-- Generation Time: Jun 25, 2006 at 01:32 AM

-- Server version: 5.0.19

-- PHP Version: 4.3.11

--

-- Database: `doa`

--

--

-- Dumping data for table `address_book`

--

INSERT INTO `address_book` ( `address_book_id` , `customers_id` , `entry_gender` , `entry_company` , `entry_firstname` , `entry_lastname` , `entry_street_address` , `entry_suburb` , `entry_postcode` , `entry_city` , `entry_state` , `entry_country_id` , `entry_zone_id` )

VALUES ( 3, 3, 'm', 'TBGraphics', 'Fred', 'Jones', '1606 James St.', '', '98225', 'Belllingham', '', 223, 62 ) ;

 

 

MySQL said:

 

#1062 - Duplicate entry '3' for key 1

Posted

Solved...

DB wasn't importing because error in line with "DEFAULT CHARSET = latin1". Took "DEFAULT CHARSET = latin1" out of first table entry and it uploaded until second table. Removed every instance of "DEFAULT CHARSET = latin1" from export DB and it imported just fine.

 

Don't know why...

1. DB exports with "DEFAULT CHARSET = latin1" when I can't import it.

 

Local machine: MySQL - 5.0.19-standard phpMyAdmin - 2.8.0.3

 

Remote machine: MySQL - 4.0.27-standard phpMyAdmin - 2.8.0.2

 

Problem between mySQL 4 and 5?

Archived

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

×
×
  • Create New...