Using the following command where "file.sql" is the path to the .sql file:

mysql -u username -p database_name < file.sql

👉 Source