Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
1 registered (1 invisible), 15 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member

art
Registered: 05/09/07
Posts: 14
Top Posters (30 Days)
Ruben Rocha 165
Rick 116
Gizmo 105
Thelockman 61
driv 52
AllenAyres 35
ScriptKeeper 34
Mark S 30
Ian 29
phoebe 25
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#213180 - 05/21/08 01:07 PM How to purge database before restoring a backup?
doug Offline
member

Registered: 01/24/07
Posts: 121
I am not well versed in php and mysql and am finding Gizmo's tutorials invaluable. Thank you Gizmo!

I am in the process of moving to a new VPS and in doing so I have made a trial run at moving my database using Gizmo's command line instructions. So now I have an old version of my database sitting on the new server.

In Gizmo's tutorial on backing up, he mentions that "And to restore said backup, after you purge data out of the MySQL database:" - which I believe would mean that I now have to purge that old database version before I can install the current database.

How do I do that? Any suggestions? All help is appreciated!

Top
#213185 - 05/21/08 01:38 PM Re: How to purge database before restoring a backup? [Re: doug]
doug Offline
member

Registered: 01/24/07
Posts: 121
Hmmm... I tried selecting all of the tables in phpmyadmin and clicked "empty". I guess that works...

Top
#213188 - 05/21/08 01:53 PM Re: How to purge database before restoring a backup? [Re: doug]
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1294
Loc: Breda, NL
I usually copy the list of tables to a textfile, and do a search replace to end up with a large list of DROP TABLE statements.
_________________________

Top
#213191 - 05/21/08 02:02 PM Re: How to purge database before restoring a backup? [Re: blaaskaak]
Sirdude Offline

*****

Registered: 04/19/07
Posts: 2066
Loc: SoCal, USA
hehe, i simply create a new DB with no tables and then import.. the mysqldump has the create tables and the mysql import specifies which DB you are importing to..

bada bing *poof*
_________________________


Top
#213192 - 05/21/08 02:11 PM Re: How to purge database before restoring a backup? [Re: Sirdude]
doug Offline
member

Registered: 01/24/07
Posts: 121
Yeah, I thought of that but I had a bad experience with that in the past. I am using Cpanel and using their mysql management tool - in the past when I deleted a BD and then tried to create a new on with the same name - the program would not let me. I would have to create a new DB with a different name frown

Top
#213193 - 05/21/08 02:17 PM Re: How to purge database before restoring a backup? [Re: doug]
Sirdude Offline

*****

Registered: 04/19/07
Posts: 2066
Loc: SoCal, USA
no probs then.. what you did is fine.. you essentially dropped all the tables..

so you are at the point where you can create the tables smile
_________________________


Top
#213194 - 05/21/08 02:25 PM Re: How to purge database before restoring a backup? [Re: Sirdude]
doug Offline
member

Registered: 01/24/07
Posts: 121
Thank you smile

Top
#213200 - 05/21/08 06:15 PM Re: How to purge database before restoring a backup? [Re: doug]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11968
Loc: Portland, OR; USA
Use PHPMyAdmin and click "drop tables" on the table select screen; that's how I do it wink...
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#213204 - 05/21/08 07:05 PM Re: How to purge database before restoring a backup? [Re: Gizmo]
doug Offline
member

Registered: 01/24/07
Posts: 121
Thanks Gizmo, I will do that.

Top
#213214 - 05/22/08 01:25 AM Re: How to purge database before restoring a backup? [Re: Gizmo]
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1294
Loc: Breda, NL
Originally Posted By: Gizmo
Use PHPMyAdmin and click "drop tables" on the table select screen; that's how I do it wink...


Duh, how simple laugh

Fun how you can look over things for years laugh
_________________________

Top


Moderator:  Gizmo 
Shout Box

Today's Birthdays
Eric Flyxe, mark_l_88@yahoo.com
Recent Topics
restricting a media tag to a single forum...
by bakerzdosen
Yesterday at 12:52 PM
Recover topics??
by femistyle
Yesterday at 12:22 PM
duplicate entries in viewmessage.php lang file (7.4.1)
by alnadabi
Yesterday at 05:54 AM
Order of variables in language files should be permanent
by alnadabi
Yesterday at 05:12 AM
How do I set Moderation Queue for an individual user?
by luket
11/20/08 11:28 AM
Forum Stats
4249 Members
33 Forums
30488 Topics
154658 Posts

Max Online: 978 @ 06/24/07 08:19 PM