1

I deleted my database and customer service sent me back a .dat file but their instructions what to do with it were bad.

They said to put the (db_backup.dat) file in mysql/data folder and then do an export to sql to restore data. Can anyone help out here how to do this the file is not a text file with sql commands in it just lots of things that are not readable.

4
  • Did they tell you that verbatim? Put a file with some random extension in a system directory and export it to SQL code? Commented Apr 19, 2012 at 14:37
  • What ? They simply wrote put the file in mysql/data and export it to get sql Commented Apr 19, 2012 at 15:05
  • Those instructions make little sense. My guess is that it's a simple SQL dump. You can verify that by opening it with a text editor. Commented Apr 19, 2012 at 15:28
  • I opened the file with notepad++ and contents are not readable least most of it does not make sense. Commented Apr 19, 2012 at 17:07

2 Answers 2

2

I'm assuming the .dat file is a text file.

mysql -u root -p password < db_backup.dat
Sign up to request clarification or add additional context in comments.

Comments

2

Looks like they could've sent you bare data file, which you should put into mysql folder and restart mysql server.

In case they sent you bare DB file, you should ask customer service which format is that. It could be a MyISAM or InnoDB file. In case they tell you format you should crate a new database of that format titled db_backup, then find where you mySQL instance keep files, stop server, put the file you get from CS into that folder, replacing existing one and start server again.

Finally, can you post few first lines of the file or screenshot from Notepad++ ?

P.S. All above are guesses until you post head of the file or which format it is.

1 Comment

the first paragraph working for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.