what steps have to be taken to transfer my data base (over 4000 products) from ms2.2 to the new structures in the Max 1.5.5?
This is a discussion on changing from ms2.2 to MAX 1.5.5 within the osCMax v1.7 Installation forums, part of the osCmax v1.7 Forums category; what steps have to be taken to transfer my data base (over 4000 products) from ms2.2 to the new structures ...
what steps have to be taken to transfer my data base (over 4000 products) from ms2.2 to the new structures in the Max 1.5.5?
Guess hep is only available to those that rent space here?
Geotex, did you ever think it was the weekend before Chirstmas, and we have lives???? This is a 100% volunteer forum.
Sheesh, with that attitude, you are lucky I am in a good mood tonight. Usually I just ignore folks with bad attitudes.
What you need to do is make a copy of your database. Then make a new DB that has the default MS2MAX structure.
Then run mysqldiff (is included with the osCommerce and Max zip distros) to compare the copy you made with the MAX structure.
Then copy the output and save it to a sql file on your computer. Then, run that batch file on your copied db. This will update the structures. Then you need to import the MAX data into the new structures in your database copy. So, export the data from the admin, admin_groups, configuration, configuration_groups, all the affiliate tables, and any other tables that are in the max database, but not in your original, to a batch sql file again.
Then run that batch sql file on the copy.
That is it. Of course, you will most likely hit some snags along the way, like sql errors becuase the addressbook table may use a different primary key, etc, in which case you will have to manually alter the table structure and data to tweak it. This entire scenario assumes you want to keep your entire existing database.
If all you want is the products, run mysqldiff, and only use the sql that applies to the products tables. Then update the copy, and export the data. Then import it directly into the MAX database.
Michael Sasek
osCMax Developer
osCmax installation service - Have our professionals install osCmax on your server - same day service!
osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0
Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.
osCmax Documentation
Thanks for the reply. Sorry about the attitude. I do quite abit of volunteer consulting myself, so was really out of line.
Anyway, your instructions are clear, and straight forward. Thanks again for the input.
Pardon my Perl-related disabilities - how does one run Perl scripts? I have access to the remote machine via PuTTY, but if possible I'd prefer to do the comparison locally (Windows, Apache, etc). If not, no big deal, I can do it remotely.Originally Posted by msasek
EDIT: Nevermind, got Perl working with the help of a friend. But now when running the ALTER SQL commands generated by the mysqldiff.pl, I'm getting this:
I know you mentioned above that this might have to be dealt with manually, but I'm unsure as to what exactly is actually changing.ALTER TABLE address_book DROP PRIMARY KEY
Incorrect table definition; There can only be one auto column and it must be defined as a key
ALTER TABLE address_book ADD PRIMARY KEY ((address_book_id))
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(address_book_id))' at line 1
I couldn't get the perl script to run or on the server due to data base security permissions (I'm on shared servers), or locally, on the Windows or Linux boxes (probably due due to my lack of knowledge of Perl). I compared the tables using mySQL Front, found the structures to be similar, then just emptied the tables I needed to transfer and uploaded an SQL file (no drop commands, just update) to populate all the products, customer and order tables. Left all the others populated with the MAX defaults. All seems to be working well, with no lost customers, orders, or products, passwords, addresses, etc.
Geotex,That is the way all updates should be!
Sandwich, the problem is that you are trying to change the primary key to a field that has non-unique data. You will have to change the 'address_book_id' data to be unique numbers. Then you should be able to change the primary key to this field.
Michael Sasek
osCMax Developer
osCmax installation service - Have our professionals install osCmax on your server - same day service!
osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0
Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.
osCmax Documentation
Bookmarks