[ic] "upgrade" from DBM files to a MySQL server solution in IC
racke at linuxia.de
Fri Apr 16 05:01:10 EDT 2004
On Thu, 15 Apr 2004 20:00:44 +0100
Eros Shop <info at eros-shop.co.uk> wrote:
> At 15:55 15/04/2004, you wrote:
> >On Thu, 15 Apr 2004 15:29:49 +0000
> >"Lyn St George" <lyn at zolotek.net> wrote:
> > > On Thu, 15 Apr 2004 13:12:16 +0100, Mark Bryant wrote:
> > >
> > > >
> > > >Hi Everyone,
> > > >
> > > >I'm thinking it's about time that I stopped using DBM files and moved
> > to an
> > > >SQL based solution with my IC install. The site it getting quite busy and
> > > >I'm hoping to improve its performance by changing to MySQL. The other
> > > >benefit, of course, that we'll be able to share the DB data with other
> > > >applications more easily.
> > > >
> > > >So, on to my (probably) daft question....
> > > >
> > > >Does anyone know the location of a complete HOWTO doc that covers the
> > > >conversion process including the importing of the existing DBM file data
> > > >into the MySQL server or does anyone have one they are prepared to share?
> > > >I've not altered the tables in any way or added new fields (although I am
> > > >using the odd redundant table field to store data I need/want rather than
> > > >use it for it's intended purpose and have to add new fields), so it
> > should
> > > >be relatively straight forward?
> > >
> > > This is one way which works:
> > >
> > > 1. backup all of your import files (products.txt, transactions.txt, etc)
> > > 2. make an html page with [tag export transactions transactions.txt][/tag]
> > > and so on for every table you have, and put this in your pages directory.
> > > 3. browse to that page and your 'import files' are now updated
> > > 4. in variable.txt, set 'mysql <tab>1', 'SQLDSN<tab>dbi:mysql:test_vwe'
> > > (being a 'test_*' table it will be created without a username or password)
> > > 5. restart IC and break out a cold beer.
> >I recommend to copy the whole catalog and test the conversion first.
> >Especially you need to check if the field sizes in the SQL database
> >are sufficient for your data.
> > Racke
> Dear Lynne,
> Many thanks for that great set of instructions, it's much appreciated :)
> I'll give them a go once I'm able to resolve the other bits of the copy and
> trial process ;)
> Dear Racke,
> You say that stuff about copying catalogs like I should already know how to
> run off a working copy, which sadly I don't. I'm sure it's easy enough when
> you know how (or have a vague clue where to start). Could you support this
> idea with some kind of process/procedure I should be following to achieve
> it please?
That heavily depends on your environment, but I give you a rough schedule:
* cp -a the catalog to a different directory
* change variables like SERVER_NAME, CGI_URL
* cp -a the link script
* create the necessary Apache configuration for the test catalog
* add the test catalog to interchange.cfg
> Also, did you have any particular fields (bearing in mind I'm using a
> default foundation install) that are likely to be affected and be too short
> after conversion? I assume you've hit this one before and is why you're
> suggesting I look out for it? A list of potentials is going to save me a
> lot of time :)
I recommend to check if you can use dbconf/mysql from recent Interchange
source code. The ICDEVGROUP did a couple of field adjustments since 4.8.7.
After you set up the test catalog and switched over to MySQL on it you can
reimport the text files with my script dbs_update (from DBIx::Easy).
This script will warn you if the field is too small (at least
for string types).
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
More information about the interchange-users