Question: How can we export/import a MySQL database via SSH commands?
Answer: we can export/import a MySQL database using below commands.
USERNAME - the MySQL user assigned to your database.
DATABASE - the name of your MySQL database.
1. Exporting a MySQL database
mysqldump -uUSERNAME -p DATABASE > backup.sql
2. Importing a MySQL database
mysql -uUSERNAME -p DATABASE < backup.sql
How to import csv to mysql table?
ReplyDelete