susitha7000 Posted September 8, 2010 Posted September 8, 2010 Can some one please help me with restoreing my database. I am bit new to SQL My web host made a database back up for me and it is on SQL 0.85 MB I tryed down loading ( "diamon1_osc2 (50) & information_schema (17)") throug phpMyAdmin and doing a restore from Admin>Tools>Restore at Backup Directory: /hsphere/local/home/~/~/admin/backups/ And nothing Happens ( I still have only the sample OSC products and no old customer database ). Can you please tell me how to do this properly
Guest Posted September 8, 2010 Posted September 8, 2010 Ashin, You don't have to import information schema at all. And depending on the table structure of your databases you MIGHT be able to import your customer information into the new database with little to no changes. However, I would suggest you use easy populate to import your products as there are more than likely table changes that would need to be changed. Chris
multimixer Posted September 8, 2010 Posted September 8, 2010 Having the backup file (ie mybackup.sql), you go to your phpMyAdmin and import it into the empty database you have for osCommerce. If you have the demo database, drop first all it's tables To import the backup, select the database, then click import, then choose the file from your computer, then click go -------------- A database contains more than your customers. You need to be sure that the old database match the new files in version and possible installed addons My community profile | Template system for osCommerce - New: Responsive | Feedback channel
susitha7000 Posted September 8, 2010 Author Posted September 8, 2010 Ashin, You don't have to import information schema at all. And depending on the table structure of your databases you MIGHT be able to import your customer information into the new database with little to no changes. However, I would suggest you use easy populate to import your products as there are more than likely table changes that would need to be changed. Chris Dear Chris, at first i tryed with out the "information schema " but nothing changed. doing a restore from Admin>Tools>Restore at Backup Directory: /hsphere/local/home/~/~/admin/backups/ <<<- Is this the right way... Since nothing changed... :( Can you please explain in detail... Sorry to toruble you I am bit new to this SQL thing and restoring thing...
susitha7000 Posted September 8, 2010 Author Posted September 8, 2010 Having the backup file (ie mybackup.sql), you go to your phpMyAdmin and import it into the empty database you have for osCommerce. If you have the demo database, drop first all it's tables To import the backup, select the database, then click import, then choose the file from your computer, then click go -------------- A database contains more than your customers. You need to be sure that the old database match the new files in version and possible installed addons Now i do have the proper old mybackup.sql from my C panel ( I think thats what its called) In the C panell in my MySQL DBs i got 3 DB's done by my webhost... but i am too scared to medel with it. I made a new proper old mybackup.sql in it and i only know to go in to its phpMyadmin... how can i link this mybackup.sql DB to my osCommerce since i think its probably liked to one of the other DB's made by my webhost. I tryed "To import the backup, select the database, then click import, then choose the file from your computer, then click go" with my proper old mybackup.sql but nothing chaged im inventory or customers and all that stuff... my website is Diamonds.lk If you could please expalin in detail this is my first time doing this.
multimixer Posted September 8, 2010 Posted September 8, 2010 First you need to know what your osCommerce database is. To find this out, go to file [catalog]/includes/configure.php and near the bottom you will see the entry define('DB_DATABASE', 'databasename'); Second you need to have your databasebackup.sql stored on your computer Then you go to phpMyAdmin (click on the relevant icon of your cpanel so that the program open) and click on the database you want from the list on the left. A list with many tables should appear on the right side Go to the bottom of the page, select them all and then choose "drop" from the menu and click "go". This will drop all tables, so you have an empty database now Now, click on "import" at the horizontal top menu, select the file databasebackup.sql from your computer (it's like uploading something), then go to the bottom and click "go". This will import the old database you have. You will see a new list of many tables appearing. Thats it My community profile | Template system for osCommerce - New: Responsive | Feedback channel
susitha7000 Posted September 9, 2010 Author Posted September 9, 2010 First you need to know what your osCommerce database is. To find this out, go to file [catalog]/includes/configure.php and near the bottom you will see the entry define('DB_DATABASE', 'databasename'); Second you need to have your databasebackup.sql stored on your computer Then you go to phpMyAdmin (click on the relevant icon of your cpanel so that the program open) and click on the database you want from the list on the left. A list with many tables should appear on the right side Go to the bottom of the page, select them all and then choose "drop" from the menu and click "go". This will drop all tables, so you have an empty database now Now, click on "import" at the horizontal top menu, select the file databasebackup.sql from your computer (it's like uploading something), then go to the bottom and click "go". This will import the old database you have. You will see a new list of many tables appearing. Thats it Dear multimixer, THanks for explaing to me in detail I did all you said and it all worked. How ever I still have the sample inventory. when i checked my live web site www.diamonds.lk this is a new web address than my previous one i had. Is there any other places like " define('DB_DATABASE', 'diamon1_osc'); " I need to go and edit. Pls let me know... :)
multimixer Posted September 9, 2010 Posted September 9, 2010 Dear multimixer, THanks for explaing to me in detail I did all you said and it all worked. How ever I still have the sample inventory. when i checked my live web site www.diamonds.lk this is a new web address than my previous one i had. Is there any other places like " define('DB_DATABASE', 'diamon1_osc'); " I need to go and edit. Pls let me know... :) There is nothing complicated about it: 1) You have a database that contains the data you want. This database has a name, username and password, as you created them via your cpanel. This you need to know. The content of the database you imported via phpMyAdmin 2) You have 2 files of relevance, where you need to say what your database name / user / password is, so that all other files know with "who" to correspond. This 2 files are [catalog]/admin/includes/configure.php and [catalog]/includes/configure.php So, you can either look to where this files are pointing too, and change the contents of this database, or you can create a new database and change the files so that they point to the new database My community profile | Template system for osCommerce - New: Responsive | Feedback channel
susitha7000 Posted September 9, 2010 Author Posted September 9, 2010 There is nothing complicated about it: 1) You have a database that contains the data you want. This database has a name, username and password, as you created them via your cpanel. This you need to know. The content of the database you imported via phpMyAdmin 2) You have 2 files of relevance, where you need to say what your database name / user / password is, so that all other files know with "who" to correspond. This 2 files are [catalog]/admin/includes/configure.php and [catalog]/includes/configure.php So, you can either look to where this files are pointing too, and change the contents of this database, or you can create a new database and change the files so that they point to the new database GREAT INFO on directing where to look for: :D hehehehe after playing around lil bit with /admin/includes/configure.php i got it to work how ever... now i can't get in to my www.website.lk/admin section i basicaly tryed all the passwords in cluding the "user_name" & "user_password" at the DB table "administrators" can you point me where to look for the password pls?
multimixer Posted September 9, 2010 Posted September 9, 2010 GREAT INFO on directing where to look for: :D hehehehe after playing around lil bit with /admin/includes/configure.php i got it to work how ever... now i can't get in to my www.website.lk/admin section i basicaly tryed all the passwords in cluding the "user_name" & "user_password" at the DB table "administrators" can you point me where to look for the password pls? Thats a good sign, because it shows that admin is connected now with the new database, and there is an other admin password stored ofcourse. Before going on with the password issue, you ned to be sure that you made the same changes in file [catalog]/includes/configure.php as you did in the file [catalog]/admin/includes/configure.php. So you should be able to see all of your products etc going to the front end of your store Now the password issue: 1) Go to your phpMyAdmin and select your DB (you know how to do this already) 2) select the checkbox of table "administrators" from the list of tables on the right of your screen 3) Go down the page and choose "empty" from the dropdown menu (attention, do not choose "drop") 4) click "go" Now table "administrators" must be empty = no records inside Now, go back to your admin. It will ask you to set a new admin user/password My community profile | Template system for osCommerce - New: Responsive | Feedback channel
susitha7000 Posted September 9, 2010 Author Posted September 9, 2010 Thats a good sign, because it shows that admin is connected now with the new database, and there is an other admin password stored ofcourse. Before going on with the password issue, you ned to be sure that you made the same changes in file [catalog]/includes/configure.php as you did in the file [catalog]/admin/includes/configure.php. So you should be able to see all of your products etc going to the front end of your store Now the password issue: 1) Go to your phpMyAdmin and select your DB (you know how to do this already) 2) select the checkbox of table "administrators" from the list of tables on the right of your screen 3) Go down the page and choose "empty" from the dropdown menu (attention, do not choose "drop") 4) click "go" Now table "administrators" must be empty = no records inside Now, go back to your admin. It will ask you to set a new admin user/password Dear multimixer, You totaly made my day all the way from Greece. THXS I have a few more question on some 2 Add-ons but first i will redo the installs and see what happens and get back to you. I don't want to waist your valuable time... Your like water to a guy lost in the Sahara desert for years! :) Sincerely, Ashin
multimixer Posted September 9, 2010 Posted September 9, 2010 Your like water to a guy lost in the Sahara desert for years! :) "Στους τυφλούς βασιλεύει ο μονόφθαλμος" (= the monocular reigns the blinds) :) Glad that you succeed My community profile | Template system for osCommerce - New: Responsive | Feedback channel
susitha7000 Posted September 10, 2010 Author Posted September 10, 2010 Hi All... IF any one can help me on this problem pls post: I tryed installing the Add-on [ "Prices for Logged-In Users Only" ---> LEGEND :"Prices for Logged-In Users Only v5 matta 10 Jun 2009 " ] with no chages what so ever to hiding the prices how ever when i try to login it shows me this message bellow but after login every thing still function. I need to hide prices for not loged in users.. pls help me. " 1054 - Unknown column 's.public_flag' in 'where clause' select count(*) as total from orders o, orders_status s where o.customers_id = '2' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1' " ***************************** ADD-on is "Prices for Logged-In Users Only" ---> LEGEND :"Prices for Logged-In Users Only v5 matta 10 Jun 2009 " 1. Run this SQL on your databas: INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Only Display Prices to Logged in Users', 'STORE_SHOW_GUESTS_PRICES', 'false', 'Only display prices to logged in users', 1, 21, '2005-02-07 00:56:05', '2005-02-06 13:11:13', NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); 2. In includes/classes/currencies.php find: function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') { replace with: function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') { if ( defined( STORE_SHOW_GUESTS_PRICES ) && ( STORE_SHOW_GUESTS_PRICES == 'true' ) && (! tep_session_is_registered('customer_id') ) ) { return TEXT_LOG_IN_TO_SEE_PRICE; } 3. In includes/languages/english.php add: define('TEXT_LOG_IN_TO_SEE_PRICE', 'Please log in to see prices'); Thats it! Nice osCommersing Regards Gosub ********************************************************************************* In the Run SQL thing Should i change "'2005-02-07 00:56:05', '2005-02-06 13:11:13'," this date????????????
susitha7000 Posted September 10, 2010 Author Posted September 10, 2010 "Στους τυφλούς βασιλεύει ο μονόφθαλμος" (= the monocular reigns the blinds) :) Glad that you succeed Hi... can you help me on this problem pls: I tryed installing the Add-on [ "Prices for Logged-In Users Only" ---> LEGEND :"Prices for Logged-In Users Only v5 matta 10 Jun 2009 " ] with no chages what so ever to hiding the prices how ever when i try to login it shows me this message bellow but after login every thing still function. I need to hide prices for not loged in users.. pls help me. " 1054 - Unknown column 's.public_flag' in 'where clause' select count(*) as total from orders o, orders_status s where o.customers_id = '2' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1' " ***************************** ADD-on is "Prices for Logged-In Users Only" ---> LEGEND :"Prices for Logged-In Users Only v5 matta 10 Jun 2009 " 1. Run this SQL on your databas: INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Only Display Prices to Logged in Users', 'STORE_SHOW_GUESTS_PRICES', 'false', 'Only display prices to logged in users', 1, 21, '2005-02-07 00:56:05', '2005-02-06 13:11:13', NULL, 'tep_cfg_select_option(array(''true'', ''false''),'); 2. In includes/classes/currencies.php find: function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') { replace with: function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') { if ( defined( STORE_SHOW_GUESTS_PRICES ) && ( STORE_SHOW_GUESTS_PRICES == 'true' ) && (! tep_session_is_registered('customer_id') ) ) { return TEXT_LOG_IN_TO_SEE_PRICE; } 3. In includes/languages/english.php add: define('TEXT_LOG_IN_TO_SEE_PRICE', 'Please log in to see prices'); Thats it! Nice osCommersing Regards Gosub ********************************************************************************* In the Run SQL thing Should i change "'2005-02-07 00:56:05', '2005-02-06 13:11:13'," this date????????????
Recommended Posts
Archived
This topic is now archived and is closed to further replies.