mysqldump -u root -p products > d:\database\products.sql
This will export a database called "products" to a file named products.sql
To import a database:
mysql -p -u root products < d:\database\products.sql
This will import a database called "products" from a file named products.sql
Note that the syntax is the same in linux box. Except that you have to change the correct path. In our example above, just change d:\database\products.sql to the location of the file in your linux box.
Example:
/home/database/products.sql
instead of d:\database\products.sql