How to import and export database from mysql by command prompt at windows


How to import and export database from mysql by command prompt at windows

First you need to go mysql\bin\ folder at after opeaning command prompt.

Export command :

 mysqldump -h localhost -u username -p password database_name > new_downloaded_database_name.sql

Import command :

Put your imported database to mysql\bin\ folder,then run the following command

mysql -u username -p password new_database_name < database.sql

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s