This article goes over exporting a database in phpMyAdmin. This can also be done via command line if that method is preferred.
- Log into phpMyAdmin.
- Once logged in, select the database on the left hand side of the screen under the PMA logo.
- Click the Export tab at the top of the page for the selected database.
- 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.
- 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:
- 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'.
mysqldump -Q databasename -uusername -p > databasename.sql