MacPC Posted March 10, 2007 Posted March 10, 2007 Hi, I am a newbie learning to use MySQL and OSCommerce. I screwed up a big time. After the installation and some config, they were working fine. I decided to was playing with phpMyAdmin, learning how to create a new database, I deleted the database named test, I thought it was just some arbitary name, little did I realize that it belonged to OSCommerce,. Now when I go to /catalog/index.php, I get this msg: 1046 - No database selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] Is there any way I can reconstruct and restore this database? Any help will be appreciated. MacPC.
Gameprodigy Posted March 10, 2007 Posted March 10, 2007 Well if you just installed Oscommerce today and didn't add a bunch of products to it you can just do a new install. What you will need to do first is create a new database, and add user permissions to it in the Mysql section of c-panel. Then i would say if you followed the oscommerce install instructions properly you should still have a directory called "install" which you would have renamed at some point to something else, you can rename it back to install and go to www.yourdomain.com/yourstore/install/index.php then just go throught the install again using the new created mysql database name, username, and password that you set up. Since you deleted the Database your store was using, you will have lost any customers, products and whatever contributions tables were added to that database, back-up back-up back-up they always say. If you were smart and did have a backup database you should be able to restore the database using the import feature from your phpmyadmin, if you used your oscommerce admin panel to create an SQL backup you will need to first use the mysql creation in your host c-panel, you will need to create the same name database as you had before, user_test with your previous username and password (which if you can remember the database name, password, and username) you can go to file manager in C-panel, open your public_html folder go to your catalog/includes/configure.php file, this configure file should show at the bottom what database it name, password, and username it was using. Now go re-create your mysql database. Once that is created, you can go back to your file manager, and open the catalog/admin/backups folder which you should have created, there should be an SQL file in here, you can either open it and copy/paste this into notepad and save it as backup.sql or you can use an FTP program to download this to your PC files. Once you have it saved on your PC, you can open your host c-panel, go to phpmyadmin choose the database you created, and do an Import of the sql file that you just saved on your PC, that should reconstruct the database tables to what you had. If you need any help send me a Private message.
MacPC Posted March 10, 2007 Author Posted March 10, 2007 Thanks Gameprodigy, I guess I will just do a new installation. Good thing that I am just learning so there were much data on it. Learn a good lesson tho-when in doubt, don't delete, and you ae right, bakup bakup backup! :blush: MacPC Well if you just installed Oscommerce today and didn't add a bunch of products to it you can just do a new install. What you will need to do first is create a new database, and add user permissions to it in the Mysql section of c-panel. Then i would say if you followed the oscommerce install instructions properly you should still have a directory called "install" which you would have renamed at some point to something else, you can rename it back to install and go to www.yourdomain.com/yourstore/install/index.php then just go throught the install again using the new created mysql database name, username, and password that you set up. Since you deleted the Database your store was using, you will have lost any customers, products and whatever contributions tables were added to that database, back-up back-up back-up they always say. If you were smart and did have a backup database you should be able to restore the database using the import feature from your phpmyadmin, if you used your oscommerce admin panel to create an SQL backup you will need to first use the mysql creation in your host c-panel, you will need to create the same name database as you had before, user_test with your previous username and password (which if you can remember the database name, password, and username) you can go to file manager in C-panel, open your public_html folder go to your catalog/includes/configure.php file, this configure file should show at the bottom what database it name, password, and username it was using. Now go re-create your mysql database. Once that is created, you can go back to your file manager, and open the catalog/admin/backups folder which you should have created, there should be an SQL file in here, you can either open it and copy/paste this into notepad and save it as backup.sql or you can use an FTP program to download this to your PC files. Once you have it saved on your PC, you can open your host c-panel, go to phpmyadmin choose the database you created, and do an Import of the sql file that you just saved on your PC, that should reconstruct the database tables to what you had. If you need any help send me a Private message.
Gameprodigy Posted March 10, 2007 Posted March 10, 2007 I would recommend after the installation to do a backup of the database
Recommended Posts
Archived
This topic is now archived and is closed to further replies.