Linux :
In command line
mysql -u username -p databasename < path/example.sql
put your table in example.sql
Import / Export for single table:
-
Export table schema
mysqldump -u username -p databasename tableName > path/example.sqlThis will create a file named
example.sqlat the path mentioned and write thecreate tablesql command to create tabletableName. -
Import a single database into table
mysql -u username -p databasename < path/example.sqlThis command needs an sql file containing data in form of
insertstatements for tabletableName. All theinsertstatements will be executed and the data will be loaded.