Import Sql file to Mysql Database Leave a comment

For import sql file to database:

mysql -uUsername -p database_name_backup.sql < database_name.sql

Then write password and start import process.

For compressed files like sql.bz2 :

bunzip2 < database_filename.sql.bz2 | mysql -uUsername -p target_database_name

Leave a Reply

Your email address will not be published. Required fields are marked *