Reply
Restoring a mySQL database
Old 03-07-2008, 06:34 AM Restoring a mySQL database
Skilled Talker

Posts: 84
Location: UK
Hey everyone, I have a CMS at the moment which handles large amounts of files. Unfortnately I had to have a server reload the other day and I only have a backup left to restore it with. The backup is a .sql file and I have ghone onto the mySQL control panel on my server and imported the files but for some reason it didn't recover anything at all really.

Is there any advise someone can offer me on this?
__________________
Chapter Zero | Apply For Finance | DCS
graham08 is offline
Reply With Quote
View Public Profile Visit graham08's homepage!
 
When You Register, These Ads Go Away!
     
Old 03-07-2008, 08:27 AM Re: Restoring a mySQL database
tripy's Avatar
Fetchez la vache!

Posts: 1,818
Name: Thierry
Location: In the void
what message did the console gave you ?
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 05:06 AM Re: Restoring a mySQL database
Super Spam Talker

Posts: 873
Hi gramham,

Yep we need the message the console gave you when it did the import... also what is the file size of your .sql file? Take a look and let us know - its possible the backup only backed up structure, not data.

All the best.
Sir P is offline
Reply With Quote
View Public Profile
 
Old 03-17-2008, 06:02 PM Re: Restoring a mySQL database
Average Talker

Posts: 16
Name: andy
open up the sql in a text editor and see if there is data as well as structure in there
__________________
Web Design Bournemouth
womble is offline
Reply With Quote
View Public Profile
 
Old 03-20-2008, 04:56 AM Re: Restoring a mySQL database
Junior Talker

Posts: 2
Humm... if your database still exists, the .sql script must destroy it before all (drop database statement).
Using .sql script as backup is more a developement way to export it from a development server toward a test or production server. An efficient back up must be done using file system.
Dbrouil is offline
Reply With Quote
View Public Profile
 
Old 03-20-2008, 09:52 AM Re: Restoring a mySQL database
tripy's Avatar
Fetchez la vache!

Posts: 1,818
Name: Thierry
Location: In the void
Quote:
An efficient back up must be done using file system.
Not every databases are file system based, like MySql.

Many don't support "hot backup", and use an dump utility which create a sql script file.
Nothing bad with that, you just have to know what you are doing.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Old 03-20-2008, 10:51 AM Re: Restoring a mySQL database
joder's Avatar
Flipotron

Posts: 6,084
Name: James
Location: In the ocean.
1) It could have been an old backup with only the table structure.

2) mysqldump backups up to and sql file. PhpMyAdmin also can.

3) To do a filesystem backup with MySQL you would stop the database server unless you explicitly lock the tables.

4) There is a mysqlhotbackup utility for MyISAM hot backups. Also innobackup for InnoDB also backups up MyISAM tables.
joder is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Restoring a mySQL database
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14813 seconds with 13 queries