EXPORT
- go to the location you want to save exported file
cd /var/www/
or wherever you would like to export the file - Run this command; ask password – Put the MySQL password
sudo mysqldump -u root -p db_name > db_export_file.sql
- Check the file location which we set in step 1
IMPORT
- Keep/Upload the sql file in the hosting server you would easily locate when you want to export
- Go to the location where you have uploaded the SQL file.
cd /var/www
or any other location you prefer - Run this command; Once asked password – Put your MySQL password
sudo mysql -u username -p dbname < dbexport.sql
0