2
mysql -u USERNAME -p DBNAME < FILENAME.sql
That command will prompt for the password of user USERNAME, and then apply the MySQL commands in FILENAME.sql to database DBNAME.
This assumes that the database already exists and that USERNAME has the required grants.
If the database already contains tables, you might need to drop any tables in the database first, depending on whether FILENAME.sql contains drop-commands for any tables it creates.