Import just a table

Problem

Import just a table sql

Solution

To import an sql table or tables from terminal then run this command:

mysql -u username -p databasename < filename.sql

the .sql file need to have all the insert command.