Tamer Zoubi @ Drupal 8


Drupal expert | Programmer

database import

How to import/export database using MySql command line

Sometimes when you have large databases, phpmyadmin or similar tool might fall when it comes to exporting or importing. The easiest (and fastest) way is to use command line.

To export use this command:

mysqldump -u USER -p PASSWORD DATABASE > filename.sql

To import database from dump file (in this case called filename.sql) use:

mysql -u username -p password database_name < filename.sql

Tags
database
database export
database import
mysql
mysqldump
WAMP