[ic] "upgrade" from DBM files to a MySQL server solution in IC 4.8.7

Lyn St George lyn at zolotek.net
Thu Apr 15 16:44:57 EDT 2004

On Thu, 15 Apr 2004 20:08:31 +0100, Eros Shop wrote:

>>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.
>>(if it won't create the new db then the MySQL default has been changed
>>to not allow a 'test_*' db. Either change it back, or SSH in as root and use
>>'mysql_setpermission' to create a new db with username and password)
>>Always back up all tables and dbs before making major changes.
>Hi Lyn,
>If I understand this correctly, if the MySQL import fails or any of the 
>fields get truncated unexpectedly, I can simply reverse the changes in step 
>4 above and revert back the DBM system provided all my backed up import 
>files (*.txt) are restored to <CATROOT>/products before I restart IC again?

So long as you have those import files current then you can revert to GDBM.

However, what Racke most probably meant with his comment, and what I 
certainly meant with my follow-up, was that you should _not_ do this kind of 
thing on a live shop.

Basically, your live shop is what your customers see and gauge your reputation
from. It should never be 'under construction', malfunctioning, or broken in any
shape or form. You should have a 'development site' which you can use for
experimenting and breaking without worry. Then, when you have the current
development subject properly sorted and working you copy that over to the live
site, test it to make sure that it really does work still, and the job is done.

If your live shop is in /home/eros/cat/eros, then SSH in and do
'mkdir /home/eros/cat/eros_dev', 
'cp -af /home/eros/cat/eros/* /home/eros/cat/eros_dev', and then edit
the dev variable.txt to suit the new vars. In your cgi-bin copy the 'eros'
link to 'eros_dev', fix up the ownership and permissions on it, then go
ahead and sort out your migration to MySQL. And for the other comment
about truncated data, look in dbconf/mysql/*.mysql for the default values
and edit them if any seem, or prove to be, too limiting. 

>If this is the case then I'm game to just give it a go when it's quiet in 
>my store ;)
>(don't worry I just heard everyone take a sharp breath and mutter under 
>their tongue that I'm loopy :p )
>Many thanks
>Eros Shop
>vwe internet ltd
>PO BOX 1067
>SL1 7YA
>Shop - http://www.eros-shop.co.uk
>EMail - info at eros-shop.co.uk
>Tel - 0870 737 3369
>Fax - 0870 737 4469

Lyn St George
+ http://www.zolotek.net .. eCommerce hosting, consulting

More information about the interchange-users mailing list