Here is how you backup database using command line. The first line is to backup and the second line is to restore.
These commands work on both Windows and Linux. In Windows you might want to setup the environment PATH, you can do this easily by pressing Window + Break > Advanced System Settings > Environment > PATH. Then run the cmd or the command prompt. If you already open a command prompt before you setup the PATH, you need to restart your command prompt
1 2 | $ mysqldump -uusername -ppassword database_name > YOURSQLFILE.sql $ mysql -uusername -ppassword database_name < YOURSQLFILE.sql |