Import and export databases on the command line

Import and export databases on the command line

PhpMyAdmin can import dumps of at most 2 MB. This tutorial shows how to import and export MySQL dumps on the command line more >>

Contents

Export

Start the command line.

Enter

"C:\PathToMySQL\bin\mysqldump.exe" -uUSER
-pPASSWORD DATABASE > filename.sql


Replace C:\PathToMySQL with the path
where your MySQL server is stored


Replace USER with your username


Replace PASSWORD with your password


Replace DATABASE with the name of
the database you wish to export


Replace filename.sql with the filename
you wish the eport to be named.

Import

Enter

mysql -u USER -pPASSWORD DATABASE < filename.sql


where

USER, PASSWORD, DATABASE and filename.sql
have the same meaning like in the export.