when I want to make a dump of my mysql databse, I use mysqldump.
It's pretty straight forward:
lets say I want to backup (dump) my database called "sheep". I just type:
mysqldump -uroot -p sheep > /home/user/sheep.sql
'-uroot' use root user
'-p' ask for password
'sheep' db name
'> /home/user/sheep.sql' put output from mysqldump in file 'sheep.sql'
In the file sheep.sql you will find all the sql commandos and data needed to rebuild the db.
When you want to import sheep.sql into another db use:
mysql -uroot -p < /home/user/sheep.sql
for more information see: