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: