mysql -u username -p database_name < file.sql Note-1: It is better to use the full path of the SQL file file.sql.