1
Kasch
How do I restore a database from a backup?
  • 2004/6/4 17:29

  • Kasch

  • Not too shy to talk

  • Posts: 109

  • Since: 2004/2/9 2


I am sorry if this is the wrong forum for my question, but I am getting a bit desperate (as usual):

I need to restore my Xoops-site SQL-database. I made a backup the 1st of June with phpMyadmin. Now I tried to restore this sql-file by uploading it with "Run SQL-query", but all I get is an error message:

Error

SQL-query :

CREATE TABLE `xoops_articles_cat` (

`id` int( 10 ) NOT NULL AUTO_INCREMENT ,
`cat_parent_id` int( 10 ) NOT NULL default '0',
`cat_name` varchar( 50 ) NOT NULL default '0',
`cat_description` text,
`cat_weight` int( 10 ) NOT NULL default '0',
`cat_showme` int( 5 ) NOT NULL default '0',
PRIMARY KEY ( `id` )
) TYPE = MYISAM AUTO_INCREMENT =7

MySQL said:


#1050 - Table 'xoops_articles_cat' already exists

Can anyone plz help me out? I don't know much about database handling.

2
Jan304
Re: How do I restore a database from a backup?
  • 2004/6/4 18:42

  • Jan304

  • Official Support Member

  • Posts: 520

  • Since: 2002/3/31


Since you don't seem to have the lines DROP IF EXISTS (wish is not needed btw), you first have to drop all tables before re-inserting.

3
Stewdio
Re: How do I restore a database from a backup?
  • 2004/6/4 22:51

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Or delete all existing tables before importing your sql file.

Next time when you export your DB, make sure click the add drop tables option.

4
Kasch
Re: How do I restore a database from a backup?
  • 2004/6/5 9:32

  • Kasch

  • Not too shy to talk

  • Posts: 109

  • Since: 2004/2/9 2


Thanks a lot both of you - it works fine now!

Login

Who's Online

830 user(s) are online (334 user(s) are browsing Support Forums)


Members: 0


Guests: 830


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits