1) tacking Mysql database file backup
#mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql
(Before restoring backup create blank Database file and then restore data
2)Command for restore Mysql database form backup file
#mysql -h hostname -u username -pthepassword databasename < dumpfile.sql