How to Export, Backup Or Dump A MySQL Database

To export a MySQL database into a dump file, simply type the following command syntax in the shell.

mysqldump -u username –ppassword database_name > dump.sql

Replace username, password, database_name and dump.sql as your needs. All data, tables, structures and database of database_name will be backed up into a mentioned file dump.sql.
[alert]Don’t put space after -p and then password[/alert]

Leave a Reply

Your email address will not be published. Required fields are marked *