Keeping it here, just in case I need it again. It’s a simple command but my brain is too lazy to bother memorizing it. I know it’s not good, but it is what it is 🤷️
Import your DB by using below command (use -R
and --triggers
flags if you want to import triggers and procedures as well):
mysql -u username -p database_name < /file_path/file_name.sql
Export your MySQL database with the below command:
mysqldump -u username -p database_name > /file_path/file_name.sql