Để Export (Xuất) database, bạn chạy câu lệnh sau:
mysqldump -u username -p database_name > backup.sql
Để Import (Nhập) database, bạn chạy câu lệnh sau:
mysql -u username -p new_database < backup.sql
Khi chạy lệnh sẽ hiện thông báo nhập password, anh cần nhập password của username database lệnh có thể thực thi.