To import data and database schema form a SQL file run the following command.
mysql -u root -p db_name < db_filename.sql