How to import a SQL file using the command line in MySQL mysql -u username -p database_name < file.sqlNote: It is better to use full path of the the sql file file.sql