import database using cmd mysql code example Example: how to import database in mysql by cmd mysql -u username -p database_name < file.sql