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