Home / Software / How to Export a MySQL Database

How to Export a MySQL Database

MySQL Database
Question: How do I export and download a MySQL database?


There are two primary ways to export a MySQL database if you are a website owner. The first is to use phpMyAdmin, a web-based graphical interface for managing databases. The second is to login through SSH and use MySQL commands. A third option, if available, is to use your web host’s control panel system.


1. Login to phpMyAdmin (The method of reaching it varies based on host. You can reach it through many web hosting control panels).
2. Click on the database you want to download.
3. Click the “Export” tab.
4. Select a format (i.e. CSV, SQL, XML).
5. Check “Save as file” and decide whether or not you want a compressed file (helpful for big databases).
6. Click “Go”.

Command Line

In some cases, especially if you have a very large database, it might not be possible to use phpMyAdmin. If you have SSH access, logging into mysql directly is an easy way export a database.

1. Login to your server via SSH
2. Enter this command:

mysqldump -u username -ppassword database_name > dump.sql

3. Use a regular file transfer method, such as FTP, to download the dump.sql file.

Photo: Flickr

Check Also


Importance of web hosting to business

The world of business is very ruthless and unfair in some cases. It is a …