HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlCritical

MySQL DB import/export command line in Windows

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
linemysqlexportwindowscommandimport

Problem

How do I import and export a local instance of a MySQL database via command-line interface?

My operating system is Windows and WampServer server is installed.

Solution

Use this for export:

mysqldump -u username -p databasename > filename.sql


this is my Sample Export in CMD and i'll save in drive D:\

mysqldump -u root -pmypassword pos > d:\pos.sql

Code Snippets

mysqldump -u username -p databasename > filename.sql
mysqldump -u root -pmypassword pos > d:\pos.sql

Context

StackExchange Database Administrators Q#25599, answer score: 51

Revisions (0)

No revisions yet.