How to export MySQL Database?

Exporting a MySQL is vital for easy backup of important files and information within the database. When you export a database, you can import it into another database server to access the queried data.

Exporting a MySQL database from your account can be done in two ways:

  1. Via phpMyAdmin Tool
  2. Via SSH

In this article, we are going to discuss the step-by-step process of both methods. 

Ready? Let’s get to it!

Export MySQL Database using phpMyAdmin Tool

PhpMyAdmin tool is a MySQL application that helps to carry out several database management activities. With phpMyAdmin, you can:

  • Create
  • Drop
  • Delete
  • Import
  • export MySQL database tables.

In this section, we are going to show you how to export databases using the phpMyAdmin tool. You can use this method when dealing with smaller-sized files or files that are less than 128MB.

To export MySQL Database using phpMyAdmin Tool, follow these steps:

Login into your cPanel Account

How to export MySQL Database?

Scroll to the Databases section and select the phpMyAdmin tab

How to export MySQL Database?

In the phpMyAdmin area, the tool will display a list of all the existing databases. Select the database you wish to export.

How to export MySQL Database?

When the database is open, it will display a set of options on the screen’s upper part. Select the Export option.

How to export MySQL Database?

Select your preferred export method. If you are unsure about what option to select, leave it at the default option chosen

How to export MySQL Database?

Click on the Go button to start the download process.

How to export MySQL Database?

This process will export your database file to your local computer successfully.

Export MySQL Database using SSH

SSH stands for Secure Shell. It’s a network protocol that established a secure connection between a client and a server. You can use it to connect to your database and export the data from it to an SQL file saved on your server. However, you need to bear in mind that SSH is only available via the Command-Line Interface, so you need to be a bit more comfortable working with commands.

After logging into the server via SSH successfully, you need to execute a command that looks like this:

$ mysqldump -p -u [your_user] [your_database] > [filename].sql

So, if you have a MySQL user called test_user that has access to a database called test_wp908040 and you want to export the data to export.sql, the command will look like this:

How to export MySQL Database?

After you enter the password, MySQL will export the entire database and will save it to export.sql. If you want to retrieve the file, you can do it via FTP.

You can also use SSH to export a MySQL Database when working with files that are larger than 128MB.

Was this helpful?

Do you want to make your WordPress/WooCommerce site lightning fast?

We guarantee to make your WordPress site load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Just fill in the form below and we will get in touch with you.

Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Do you want to learn how to grow your website in 2023?

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. You will learn about:

  • What is the future of SEO and how you can be ahead of the curve
  • Web Design best practices and why they matter
  • Secrets to getting the foundation for your website to thrive

An Exclusive Insiders Look Behind The SEO and Web Development Curtain


Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.