For Export Database  through command line, you can simply use one command

Mysql  -U Username -P Password  DatabaseName  >  yourbackup.sql 

 

Similarly, you can import database  through command line

Mysql  -U Username -P Password  DatabaseName  <  yourbackup.sql