Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Upgrading from 1.2 to 1.3.x / Database import - not going to plan 1.27-1.32

Database import - not going to plan 1.27-1.32

Locked

Started by peanut77 on 22 Aug 2006, 9:16 AM · Views: 3,700

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
22 Aug 2006, 9:16 AM
#1
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Database import - not going to plan 1.27-1.32

Hi

I have installed zen 1.32 (in a test area) - & created a database

I now want to import my db from 1.27 into this database.

I have backed up the database as a gzipped file then I went to php admin for my new 1.32 version database and then imported the gzipped file - however I keep getting errors the

-- phpMyAdmin SQL Dump
-- version 2.6.4-pl3
-- http://www.phpmyadmin.net

-- Host: localhost:3306
-- Generation Time: Aug 22, 2006 at 09:52 AM
-- Server version: 4.1.19
-- PHP Version: 5.0.5

-- Database: vine_zen

CREATE DATABASE vine_zen DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci

the database I am inprting into is called organic

I am a designer and just need pointed in the right direction - do I need to take out the following lines before importing

-- Database: vine_zen

CREATE DATABASE vine_zen DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci

?

Thanks have looked through the faqs and have followed the upgrade instructions - but I am lost at the bit which says

Restore your database from the backup in step #1 earlier into your NEW database just created.

I am trying to import - is that the same thing?

22 Aug 2006, 10:01 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Database import - not going to plan 1.27-1.32

You will need to add ## before any CREATE DATABASE or USE DATABASE lines in your backup file before importing.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2006, 10:09 AM
#3
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Database import - not going to plan 1.27-1.32

HI Dr Byte

I removed those lines and managed to get it to import but then I had duplicate entries - as my 1.27 table had prefixes - I then open my sql file up removed all the pre fixes and reimported - got funny charachters appreaing (a's with wee hats) so I am just starting from scratch.

I will create a new database install zen 1.32 - then import a prefix free 1.27 database table and remove the create database line

Hopefully this will be ok?

Thanks again for your quick response

22 Aug 2006, 10:14 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Database import - not going to plan 1.27-1.32

There's nothing wrong with continuing to work with prefixes.

If you set up your 1.3 site to use the same prefix as your old site, it'll make life a lot easier.

After you've got things upgraded, you can rename all your tables using a quick script. But for now, keep the prefix and you won't accidentally remove any incorrect content from your backup files.

You might also re-backup your 1.2.7 database, but click on your actual database first to select it, then choose the Export option, which should naturally skip inserting those CREATE DATABASE and USE DATABASE statements.
(You'll know you've got it right when the "File Name Template" next to the "Save As File" checkbox shows DB instead of SERVER)
This just makes it easier so you don't have to edit the SQL file at all.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2006, 10:18 AM
#5
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Database import - not going to plan 1.27-1.32

Thanks again - and apologies for the spelling.

Fingers crossed all will go well this time.

I just couldn't find anything which actually told me to make those changes to the sql file and not having a clue I followed the instructions quite literally.

2 Oct 2006, 7:23 PM
#6
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Database import - not going to plan 1.27-1.32

peanut77:

Thanks again - and apologies for the spelling.

Fingers crossed all will go well this time.

I just couldn't find anything which actually told me to make those changes to the sql file and not having a clue I followed the instructions quite literally.

Hey people!

Do you get your scandinavian characters working with upgrade?
To me all the customer names, addresses, product names and descriptions get mixed with corrupted ä, ö, å, é, ü etc.
I have tried different options to change the sql dump as utf8 (originally latin1) but nothing seems to help... there are thousands of products, hundreds of customers and I can't simply start changing the info letter by letter!

Now ä = √§, ö = √∂, å = √•, so a complete mess with words.

Anyway to get the database information fixed?

Elli

I may be blond but at least I found Zen.