DEV Community

Javel Rowe
Javel Rowe

Posted on

TAWIL: How to export a MySQL Database in a SINGLE file πŸ§Ÿβ€β™‚οΈ

Alt Text

Today at work I learnt how to do the above because I needed to share a local db with a co-worker in a single file. It turns out that with MySQL workbench and just a few mouse clicks, you too can export a db in 4 easy steps 🀯. Let's start!

Step 1

go-to-admin

In the Navigation sidebar located to the left of the screen, select the Administration tab.

Step 2

step-2-select-proj-to-export

Next, select Data Export (it should be the 5th option from the top). A Data Export screen will appear. Here you get the option to select the checkbox beside the database you want to export. You can also choose which tables inside the database to share by clicking on its name then selecting the checkbox beside the tables.

Step 3

step-3-select-options

This is the second to last step in the process. I wanted to share both the tables and the data within, therefore I selected "Data Structure and Data" in the drop down. I also wanted to share stored procedures/functions but not triggers so I selected only that checkbox. Next, I chose Export to Self Contained File and the location to store the export. Finally, I marked the checkbox for Create Dump in a Single Transaction and Include Create Schema.

Step 4

step-4-exported

In the final step, we click that nice export button thennn πŸͺ„πŸͺ„πŸͺ„ TaDaaaa, the exported db appears in the folder we had selected in Step 3.

Attributions

Header : People vector created by pch.vector - www.freepik.com

Top comments (0)