How to import a .sql file using terminal. You mush have the database username, password and database name at hand.

mysql -u username -p database_name < file.sql

Use -R and --triggers to keep the routines and triggers of original database. They are not copied by default.