How to import and export a large mysql file

If you need to import or export a large mysql file, you can forget about phpmyadmin. I was stuck with a 2 gig file and needed a solution. The easiest and only way I could find was to upload the file through root with winSCP and run these command.

To export:
mysqldump --opt -Q -u username_username -p username_db > /home/dwhs_wrdprss1.sql

To import:
mysql -u username_username -p username_db < /home/dwhs_wrdprss1.sql