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
1 | mysqldump -uUSERNAME -p DATABASE > backup.sql |
2. Importing a MySQL database
1 | mysql -uUSERNAME -p DATABASE < backup.sql |
How to import csv to mysql table?
ReplyDelete