elect Posted March 23, 2004 Share Posted March 23, 2004 I have looked around the forums and could not find an aswer to my question. I would appreciate any help. I had modified my db architecture for ver 2.1, now I installed a clean 2.2ms2 ver in sub dir. I managed to coppy several tables for categories to show up in the new ver2.2m2 any how I tried to to do same for customer and products those both didn't not work. For customer I copied the following tables: customers customers_info address_book I tried to login into my test account from(from 2.1) and get this error Query was empty - Query was empty Query was empty [TEP STOP] when in admin sect I can see the list of customers but when I click on cutomers name there is an error and no detail appear For products I copied the following tables: products_attributtes products_description products_notification products products_to_categories thanx -Elect Link to comment Share on other sites More sharing options...
Mark Evans Posted March 23, 2004 Share Posted March 23, 2004 if you have modified the DB for 2.1 then the best way will be to use mysql_diff which you can find in the catalog/extras folder Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
elect Posted March 23, 2004 Author Share Posted March 23, 2004 if you have modified the DB for 2.1 then the best way will be to use mysql_diff which you can find in the catalog/extras folder I'm not sure how to use a .pl file(mysqldiff.pl). Is this a query file I should run on my old db?....I'm a bit unsure, could you tell me how I would go about it. Thanks for your help, Elect Link to comment Share on other sites More sharing options...
Mark Evans Posted March 24, 2004 Share Posted March 24, 2004 You will need access to perl to run the script. What you do is run it as follows ./mysqldiff.pl db1 db2 > upgrade.sql it will then create sql statements in the upgrade.sql file to make the strucure of DB1 match DB2. HTH Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
elect Posted March 24, 2004 Author Share Posted March 24, 2004 ./mysqldiff.pl db1 db2 > upgrade.sql Would this line be executed in browser or do I have to telnet in and do on the server?Is this the syntax, beside db1 being replace with actual old db name and actual name for db2? Thank for you time, Elect Link to comment Share on other sites More sharing options...
elect Posted March 25, 2004 Author Share Posted March 25, 2004 ./mysqldiff.pl db1 db2 > upgrade.sql I figured out how to run the scirpt but I'm having issue with some of the syntax. After typing the code above I get the following options: to prevent this prefix the database argument with `db:'. > Options: > -?, --help show this help > -d, --debug[=N] enable debugging [level N, default 1] > -o, --only-both only output changes for tables in both databases > -n, --no-old-defs suppress comments describing old definitions > -t, --table-re=REGEXP restrict comparisons to tables matching REGEXP > -i, --tolerant ignore DEFAULT and formatting changes > > -h, --host=... connect to host > -u, --user=... user for login if not current user > -p, --password[=...] password to use when connecting to server > > for <databaseN> only, where N == 1 or 2, > -hN, --hostN=... connect to host > -uN, --userN=... user for login if not current user > -pN, --passwordN[=...] password to use when connecting to server > > Databases can be either files or database names. > If there is an ambiguity, the file will be preferred; > to prevent this prefix the database argument with `db:' Also upgrade.sql file upears but it's empty Any hints would be appreciated Elect Link to comment Share on other sites More sharing options...
Mark Evans Posted March 25, 2004 Share Posted March 25, 2004 What are your databases called? Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
elect Posted March 26, 2004 Author Share Posted March 26, 2004 What are your databases called? 2.1 db = cfgdboscom 2.2 m2 db= cfgdatabase22 Thank you for your help Elect Link to comment Share on other sites More sharing options...
Mark Evans Posted March 26, 2004 Share Posted March 26, 2004 Ok then you need to execute ./mysqldiff.pl 2.1 cfgdboscom cfgdatabase22 You will also need to ensure you are root as well as the perl script will need access to the databases. Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
elect Posted March 29, 2004 Author Share Posted March 29, 2004 Ok then you need to execute ./mysqldiff.pl 2.1 cfgdboscom cfgdatabase22 You will also need to ensure you are root as well as the perl script will need access to the databases. I logged into mysql server as Super User executed the sript you gave me and got this I tried to execute this script [root@group cgi-bin]# ./mysqldiff.pl 2.1 db:cfgdboscom db:cfgdatabase22 Usage: mysqldiff.pl [ options ] <database1> <database2> Options: -?, --help show this help -d, --debug[=N] enable debugging [level N, default 1] -o, --only-both only output changes for tables in both databases -n, --no-old-defs suppress comments describing old definitions -t, --table-re=REGEXP restrict comparisons to tables matching REGEXP -i, --tolerant ignore DEFAULT and formatting changes -h, --host=... connect to host -u, --user=... user for login if not current user -p, --password[=...] password to use when connecting to server for <databaseN> only, where N == 1 or 2, -hN, --hostN=... connect to host -uN, --userN=... user for login if not current user -pN, --passwordN[=...] password to use when connecting to server Databases can be either files or database names. If there is an ambiguity, the file will be preferred; to prevent this prefix the database argument with `db:'. Link to comment Share on other sites More sharing options...
Mark Evans Posted March 29, 2004 Share Posted March 29, 2004 Do you run the server yourself or do you utilise a hosting company? I had that problem when the user i tried running the script as didnt have access to the DB. Try the following ./mysqldiff.pl --host=localhost --user=yourdbusername --pasword=yourdbpassword cfgdboscom cfgdatabase22 Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
elect Posted March 31, 2004 Author Share Posted March 31, 2004 Try the following ./mysqldiff.pl --host=localhost --user=yourdbusername --pasword=yourdbpassword cfgdboscom cfgdatabase22 I use a hosting company. I logged in as the root and ran the script mentioned above and finally had a result LTER TABLE address_book CHANGE COLUMN entry_country_id entry_country_id int(11) NOT NULL default '0'; # was int(5) NOT NULL default '0' ... and whole lines like it what should be my next stept? I checked my 2.2ms2 db through phpMyAdmin and don't see any changes. There are also no changes as far as the shop it self. Thank you so much for your time, Elect Link to comment Share on other sites More sharing options...
elect Posted April 1, 2004 Author Share Posted April 1, 2004 How to import the info form my old db to my new db after running the script? I have tried the following: dumbing the data and struct of the 2.1 db into a file and then inserting that data and struct from file into 2.2m2 db. I get sql error in address_book table ran the script with second db empty. The result is script has an error on line 486 switched the config file so that 2.2m2 catalog connects to 2.1 db. The catalog is not displayed, just error on page. Please Help! Elect Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.