Creating a MySQL Database Dump

This tutorial explains the creation of a MySQL database dump. It is important to note that both the data and the schema used need to be parts of the export file.

The method is detailed for the following tools:

  • MySQL Workbench 8.0 CE

  • HeidiSQL.


MySQL Workbench 8.0 CE

Prerequisites:

  • MySQL Workbench 8.0 CE installation

  • Initialized SOX repo schema

 

Method

  1. Open MySQL Workbench.

  2. Open the SOX repo instance.

  3. On the Server menu, choose Data Export.

  4. Enter your MySQL credentials (defaults: root/0000).

  5. Select the appropriate schema, i.e., sox_repo.

  6. Enable the following options:

    1. Export to Self-Contained File

    2. Create Dump in a Single Transaction (self-contained file only)

    3. Include Create Schema

  7. Click Start Export.


HeidiSQL

Prerequisites:

  • HeidiSQL installation

  • MySQL database w/ SOX repo

 

Preparation / HeidiSQL configuration:

  1. Launch HeidiSQL.

  2. In the bottom left corner, click New.

  3. Choose a name for your connection.

  4. Edit the following fields:

    1. Hostname / IP: put your MySQL host (refer to .\configuration\config-mysql\cdo-server.xml).

    2. Benutzer (User): put the applicable user name (refer to .\configuration\config-mysql\cdo-server.xml).

    3. Passwort (Password): put the password for this user (refer to .\configuration\config-mysql\cdo-server.xml).

  5. Do not edit any of the other fields.

  6. Click Speichern (Save) near the bottom left edge.

 

Creating the database dump:

  1. Launch HeidiSQL.

  2. Connect to the SOX repo database.

  3. Navigate to Werkzeuge > Datenbank als SQL exportieren (Tools > Export database as SQL).

  4. In the left-hand area, select your SOX repo database.

  5. Select Tabelle(n): Erzeugen (Table[s]: Create) and Daten: Einfügen (Data: Insert).

  6. Choose a file name for your export.

  7. Click Exportieren (Export).