how to import .sql file in mysql using command prompt windows code example Example: import database through command line mysql -u username -p database_name < file.sql