TanPimp Posted December 16, 2005 Posted December 16, 2005 I just backed up my database today. At least I think I backed it up. I went into phpmyadmin and exported it, so I assume its backed up. Anyways, I installed easypopulate, and while using it, I messed something up. Can someone tell me how to restore the database? i tried to go into phpmyadmin in the sql section and just upload the sql file I exported. But I got an error and that seemed to make things worse. Any help I can get would be great. Thanks!
ozcsys Posted December 16, 2005 Posted December 16, 2005 I just backed up my database today. At least I think I backed it up. I went into phpmyadmin and exported it, so I assume its backed up. Anyways, I installed easypopulate, and while using it, I messed something up. Can someone tell me how to restore the database? i tried to go into phpmyadmin in the sql section and just upload the sql file I exported. But I got an error and that seemed to make things worse. Any help I can get would be great. Thanks! Sounds like you are doing it correctly or close anyway. In phpmyadmin go to the sql tab and either browse to the backup you made or cut and paste the contents to the window. The problem could be with your exported file if you did not export the structure or all the info. For future reference the backup in your osC admin backs up the database and that way you do not have to do it from your phpmyadmin and you will know you are backing up everthing you need. The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
TanPimp Posted December 16, 2005 Author Posted December 16, 2005 Here's what happens: SQL query: -- phpMyAdmin SQL Dump -- version 2.6.4-pl2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 15, 2005 at 03:16 PM -- Server version: 4.1.13 -- PHP Version: 4.3.11 -- -- Database: `cardshar_osc1` -- -- -------------------------------------------------------- -- -- Table structure for table `address_book` -- CREATE TABLE `address_book` ( `address_book_id` int( 11 ) NOT NULL AUTO_INCREMENT , `customers_id` int( 11 ) NOT NULL default '0', `entry_gender` char( 1 ) NOT NULL default '', `entry_company` varchar( 32 ) default NULL , `entry_firstname` varchar( 32 ) NOT NULL default '', `entry_lastname` varchar( 32 ) NOT NULL default '', `entry_street_address` varchar( 64 ) NOT NULL default '', `entry_suburb` varchar( 32 ) default NULL , `entry_postcode` varchar( 10 ) NOT NULL default '', `entry_city` varchar( 32 ) NOT NULL default '', `entry_state` varchar( 32 ) default NULL , `entry_country_id` int( 11 ) NOT NULL default '0', `entry_zone_id` int( 11 ) NOT NULL default '0', PRIMARY KEY ( `address_book_id` ) , KEY `idx_address_book_customers_id` ( `customers_id` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =7 MySQL said: Documentation #1050 - Table 'address_book' already exists Does anyone have any ideas?
ozcsys Posted December 16, 2005 Posted December 16, 2005 I am assuming that is not the complete sql file and you are just showing the beginning. If so you should have added drop table when doing the export. empty the database completely (removing all the tables) and then run the sql file again The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
TanPimp Posted December 16, 2005 Author Posted December 16, 2005 yah that is not the full file, that is just what shows up when I try to import it. So i need to delete all of my tables? Is there a way to do that all at once without doing each table at a time? thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.