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