Wednesday, December 8, 2010

mysql data export and import

To export a database dump into a sql file use (the structures you'll normally create by a db:migrate or an equivalent script.)

mysqldump -u username -ppassword –no-create-info database_name > dump.sql


and to load it back


mysql -u username -ppassword database_name < dump.sql

No comments:

Post a Comment