Exporting/dumping your database
To export your database you need to perform a database dump. This can be done via the command line using SSH or alternately via a web based interface from the control panel.
Exporting from the control panel
PhpMyAdmin is installed and configured within the control panel for your webhosting account and provides a graphical interface which allows you to export your database.
To export your database, from the control panel:
- Click the "MySQL web interface" link
Enter the MySQL username and password
- Choose the database from the left hand navigation menu
- Under "View dump..." choose "Structure and data" and "Send" options, then select the "Go" link to the right.
- The contents of your database will be downloaded in your browser.
A MySQL database export (or dump) is a plain text file that contains all of the commands required to rebuild your database. It can be viewed and modified in a text editor.
Exporting from the command line
The pg_dump command allows you to dump data from the MySQL database.
To dump an entire database with schema, run:
mysqldump database_name > dump_file.txt
Type your username then hit Enter, then type your password and hit Enter.
Where:
database_name should be replaced with your username
dump_file.txt is the filename to write the contents of the dump to.
For more detailed information type mysqldump --help at the shell, or read the mysqldump documentation.
