Export and Import with MySQLDump

Here is the syntax.

To export the database –


C:\xampp7\mysql\bin>mysqldump.exe --databases mydatabase --user myuser --password >mydatabase.dump.sql
Enter password: ************

To import the dump to database –

Creation of the database in other server:


MariaDB [(none)]> create database mydatabase;
Query OK, 1 row affected (0.00 sec)

From command prompt, let’s import the dump


D:\Softwares\xampp\mysql\bin>mysql -uroot -p mydatabase <D:\gandhari\documents\projects\jessica\mydatabase.dump.sql
Enter password:

img_1520

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s