5

I work for a doctor's office, and we are in the process of switching EMR systems. The previous system has provided a physical 'dump' of the database. I however, don't know how to open this database and view the contents therein. The file is 1.2 gb with less then 1000 lines of SQL commands so I assume that all of the data is there. Here's what I've tried thus far:

  • Opened in a text reader: All it shows is a bunch of SQL commands to create the database tables
  • Installed MySQL Workbench and tried to create a "EER Model From SQL Script": This just creates the database structure.
  • Using MySQL Workbench/Setup a 'localhost' server: Tried a 'import' of the .sql file onto the newly created 'server' but it doesn't work and spits out an error

What are some steps to properly opening and obtaining the data found within a MySQL data dump?

I'm VERY new to the whole database management so if I've missed any details feel free to prompt.

asked Jul 13, 2011 at 15:01

1 Answer 1

10

Although there are a number of tools out there, I prefer the command line for tasks such as this. Better performance, and just simpler.

Make sure you're logged into the mysql client:

mysql -u <username> -p

The first step is to create a database in mysql that you want the data in:

CREATE DATABASE <database name>;

Then you need to open--or use--that new database, which is empty:

USE <database name>;

All that's left is to do the import:

\. /path/to/file (or if in Windows, \. C:\PATH\TO\FILE)

If all goes well, you'll see a bunch of output about "Query successful, N rows affected" and so on.

answered Jul 13, 2011 at 16:21
1
  • No worries. Happy DBAing! Commented Jul 13, 2011 at 17:34

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.