OpenMRS data import

Once the data model is finalized and the relevant concepts are created to store the data, the next step is to create a dummy database with the changed DB schema and sample data .

 

Uploading sample data onto the server is an easy process, which lets you create a dump database, with sample data, table structures to start working with. This can be achieved either directly via the command line locally or on the server and mySQL work-bench. The steps for the same have been described below.

Using Command Line

  1. Open up a windows command prompt.

Click Start -> Run

Enter “cmd” into the dialog box and click the “OK” button.

2. Go to the directory that the MySQL client utility is located.

cd C:\Program Files\MySQL\MySQL Server 5.7\bin

3. Import the dump of your database or table.

Run the mysql.exe program using the following arguments.

mysql –u[user name] -p[password] -h[hostname] [database name] < C:\[filename].sql

 

Using MySQL WorkBench

  1. Open MySQL Workbench.

 

 

 

 

 

 

2. Click on server > Data Import

It will open the data import wizard.

 

 

 

 

 

3. Select the location of the dump file and choose the schema where you want to load the dump(the server you created while setting up OpenMRS - OpenMRS server setup using SDK )

 

 

 

4. Click on Start Import to load the MySQL dump.