Export a Database in phpMyAdmin

This article goes over exporting a database in phpMyAdmin.  This can also be done via command line if that method is preferred.

  1. Log into phpMyAdmin.  For shared, here is the link to phpMyAdmin: https:/pma.safesecureweb.com.
  2. Once logged in, select the database on the left hand side of the screen under the PMA logo.
    phpMyAdmin
  3. Click the Export tab at the top of the page for the selected database.
    phpMyAdmin
  4. The options to export are shown. By default, the export will create a .sql file which can be reimported into any database server.  Additionally, the Save as File option at the bottom of the page is checked and you can choose to compress the database file if it is a database with a large amount of data.
    phpMyAdmin
  5. If you choose, this can all be done via command line by logging into the MySQL database server via SSH and running the following command:
    mysqldump -Q databasename -uusername -p > databasename.sql
  6. Substitute in your database name for databasename, username for username, and enter in the password for the database.  This will save the database backup to the current location on the server (type ‘pwd’ to determine where you are if you’re not sure) as the file ‘databasename.sql’.