Contact Latest Articles Home rafled dot net

How to export a database in MySQL Bash Shell


27th Dec, 2020 | Tech


Command to export database in MySQL.

First, login to your server and use the following command.

mysqldump -u username -p database_name > export.sql

What this command does is, username is the name of user which you can log in to the database with.

database_name is the name of database you're exporting.

export.sql is the name and the directory where your exported file will be located.