Small stuff about how to import and export data to/from MySQL with the help of mysql and mysqldump commands,

IMPORT database to MySQL,

D:\>mysql -u username -p password database_name < file.sql

database_name should be there in database. Put your username, password and database_name with yours MySQL information. After this command, data from file.sql will be imported to your database.

EXPORT database from MySQL,

D:\>mysqldump -u username -p password database_name > file.sql

Please replace username, password and database_name with yours MySQL information.

After this command, data will be exported to file.sql


Leave a Reply